-
Notifications
You must be signed in to change notification settings - Fork 62
feat: Add __dataframe__ interchange support #2063
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
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
|
||
| @functools.cache | ||
| def _arrow_column(self): | ||
| # Conservatively downloads the whole underlying dataframe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a TODO / issue to collect data regarding how common it is to get one column vs many?
| return self._dataframe._arrow_dataframe().get_column(self._pos) | ||
|
|
||
| def size(self) -> int: | ||
| return self._arrow_column().size() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise, theoretically we could calculate this without downloading any data. I think it'd be worth tracking an evaluation whether this should be optimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the new version of this, thanks!
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕