Skip to content

DOC: Fix sparse and dense array memory usage comparison. #61495

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

Merged
merged 1 commit into from
May 26, 2025

Conversation

JMRaczynski
Copy link
Contributor

@JMRaczynski JMRaczynski commented May 26, 2025

This MR fixes misleading part of sparse user guide, which suggests that dataframes consume far less memory than they really do, due to wrong units calculation.

Also changed usage of str.format() to more modern f-string syntax in part of guide which was mentioned above.

@datapythonista
Copy link
Member

/preview

Copy link
Contributor

Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/61495/

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @JMRaczynski, well spotted. I guess the idea was to use Kb instead, but being the memory usage 320128 and 224 bytes, I think it's fine to use bytes too.

@datapythonista datapythonista merged commit 50e23e7 into pandas-dev:main May 26, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants