-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(python): Native implementation of dataframe interchange protocol #10267
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
4ed0c65
to
a111410
Compare
@MarcoGorelli from your experience with the DataFrame API, could you give me a hint as to where the |
@ritchie46 Could you answer this one for me? |
No, we don't. |
I think that's the idea, but in practice it looks like for both pyarrow and for pandas it's not implemented cc @AlenkaF - do you know about how |
That sounds right to me, assuming that that is the call where you ensure the data is accessible in memory. In case calling I'm not sure why it isn't implemented in other libraries yet, probably just skipped for convenience. It shouldn't be a big burden to do so I'd think though. And at least in the case of pandas with numpy floating-point dtypes, it is in principle useful - |
Thanks for the input. I guess setting Implementing this for our I don't know what to do with Though now I am thinking I should probably save it for a separate PR. It's not trivial and this PR is already huge. |
I think so, yes.
My first thought here was that it should only apply to columns with floating-point dtypes. However, after doing some digging to confirm that, I instead found data-apis/dataframe-api#125. So perhaps don't do anything here, and if we confirm on that issue that no one needs it, we should instead follow through and remove the keyword. |
Great, thanks for the insights. In that case, I'll not implement anything for this right now. |
f0ff253
to
72a8200
Compare
8f365d3
to
9d3c5c8
Compare
ede4ba3
to
b3364c6
Compare
97c73cd
to
ff89cdd
Compare
ff89cdd
to
6ea1c54
Compare
30c2eac
to
e2c9ebe
Compare
Discussed with Ritchie and this is going in 🚀 Next up: |
We have a default set to And sorry for late response! |
Closes #10035
Changes:
DataFrame.__dataframe__
natively, rather than relying on pyarrow.from_dataframe
implementation to the newinterchange
module. For this function, we still rely on pyarrow's implementation (for now).