-
Notifications
You must be signed in to change notification settings - Fork 912
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
WIP: Support decimal dtypes #17113
base: branch-25.02
Are you sure you want to change the base?
WIP: Support decimal dtypes #17113
Conversation
Polars only has 128 bit decimals. This currently loses the precision for round trips.
Conversion back to arrow doesn't work because we lost the precision argument |
Would resolving #17080 (which should be possible with arrow 18) resolve this? Could we carry around extra metadata in the interim to manage this (necessary until we drop support for older versions of arrow anyway)? |
So I don't really understand decimals, but AFAICT, polars only has an underlying We haven't really looked at dtypes that need extra metadata in cudf-polars yet, but both decimals and struct dtypes do need that. And then, transitively, list dtypes also need it. So I think we're going to have to do something. One thing might just be to keep the polars dtype around and use that in various places. |
As an example:
So the data are all there, but the precision is missing |
Ah OK so this is about the values stored in the dtype, not the dtype itself being lost (which is what my question was about, i.e. whether getting 32 and 64 bit decimals in arrow would help; although even then I guess you'd need those explicitly added in polars too). |
Description
Polars only has 128 bit decimals. This currently loses the precision for round trips.
I can run a groupby and it seems to work.
Checklist