Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sizeof() not working correctly with Dataframes #3229

Closed
jdiaz97 opened this issue Nov 22, 2022 · 1 comment
Closed

sizeof() not working correctly with Dataframes #3229

jdiaz97 opened this issue Nov 22, 2022 · 1 comment

Comments

@jdiaz97
Copy link

jdiaz97 commented Nov 22, 2022

sizeof() returns the size of a variable in bytes. This doesn't work with dataframes as it will return very small amounts that don't represent the actual size.

I have very normal 13312×5 DataFrame and sizeof() returns 48 bytes.

@bkamins
Copy link
Member

bkamins commented Nov 22, 2022

sizeof returns the size of the object (and DataFrame itself is a small object, however, it can hold references to large objects).

You probably are looking for Base.summarysize which computes the amount of memory, in bytes, used by all unique objects reachable from the argument.

@bkamins bkamins closed this as completed Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants