A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/8578 below:

df.info() incorrectly reports memory use for string data? · Issue #8578 · pandas-dev/pandas · GitHub

Doubling the string size does not change the reported memory use:

In [64]: d=pd.DataFrame(["%06d" %x for x in range(1000000)])
    ...: d.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 1000000 entries, 0 to 999999
Data columns (total 1 columns):
0    1000000 non-null object
dtypes: object(1)
memory usage: 15.3 MB

In [65]: d=pd.DataFrame(["%012d" %x for x in range(1000000)])
    ...: d.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 1000000 entries, 0 to 999999
Data columns (total 1 columns):
0    1000000 non-null object
dtypes: object(1)
memory usage: 15.3 MB

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4