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

Implement .nbytes, .size_mb, and .size_gb for KeyData #430

Merged
merged 1 commit into from Jul 25, 2023
Merged

Conversation

JamesWrigley
Copy link
Member

Added because it can be useful to see how large a dataset will be in memory without actually loading it.

.size_mb and .size_gb are there because I wanted a way to quickly check what the size of a dataset is in human-readable units. I could also implement a .size() function that takes in a unit, but I'd like to keep .size_mb and .size_gb anyway for ease-of-use.

Added because it can be useful to see how large a dataset will be in memory
without actually loading it.
@JamesWrigley JamesWrigley self-assigned this Jul 16, 2023
@philsmt
Copy link
Contributor

philsmt commented Jul 18, 2023

Sounds useful and strightforward, LGTM. I doubt there's a need for any decimal prefix other than M and G, so taking in arbitrary prefixes seems over the top.

@JamesWrigley JamesWrigley merged commit e8ffdb7 into master Jul 25, 2023
8 of 10 checks passed
@JamesWrigley JamesWrigley deleted the kd-size branch July 25, 2023 09:21
@takluyver takluyver added this to the 1.14 milestone Jul 27, 2023
@takluyver
Copy link
Member

takluyver commented Jul 27, 2023

prnote: New attributes .nbytes, .size_mb and .size_gb to conveniently see how much data is present for a given source & key.

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

Successfully merging this pull request may close these issues.

None yet

3 participants