Skip to content

ENH: showing memory used #6852

Closed
Closed
@jreback

Description

@jreback

maybe a function nbytes() to return memory usage

maybe as a tuple : the Series in [6] and then a series of the axis data?

In [5]: df = DataFrame({ 'float' : np.random.randn(1000), 'int' : np.random.randint(0,5,size=1000), 'date' : Timestamp('20130101'), 'string' : 'foo' })

In [6]: Series(dict([ (b.dtype,b.values.nbytes) for b in df._data.blocks ]))
Out[6]: 
datetime64[ns]    8000
int64             8000
float64           8000
object            8000
dtype: int64

In [7]: df.index.nbytes
Out[7]: 8000

In [8]: df.columns.nbytes
Out[8]: 32

Metadata

Metadata

Assignees

No one assigned

    Labels

    IdeasLong-Term Enhancement DiscussionsPerformanceMemory or execution speed performance

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions