-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix(python): Include pl. qualifier for inner dtypes in to_init_repr() #16235
base: main
Are you sure you want to change the base?
Conversation
I somehow managed to close the preceding PR #16223 where @stinodego suggested to create a utility function instead of putting this into the DataType classes. |
It would be an option to include an optional prefix parameter for |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16235 +/- ##
==========================================
- Coverage 80.85% 80.80% -0.06%
==========================================
Files 1394 1394
Lines 179955 179407 -548
Branches 2909 2927 +18
==========================================
- Hits 145508 144975 -533
+ Misses 33942 33927 -15
Partials 505 505 ☔ View full report in Codecov by Sentry. |
Noted one extra thing: Is it really possible with the current version to have a pl.List/pl.Array without a properly defined inner dtype (I think that was possible in the past)? In the constructor both call py_type_to_dtype which would raise an Exception. Would simplify things a little bit... |
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.
Thanks, looks good! A few comments.
Noted one extra thing: Is it really possible with the current version to have a pl.List/pl.Array without a properly defined inner dtype (I think that was possible in the past)? In the constructor both call py_type_to_dtype which would raise an Exception. Would simplify things a little bit...
This is possible for user defined types, but not for data types returned by Series.dtype
. So you don't have to handle it in this function.
Any news on this one @stinodego |
Closes #15802
This is a minimal fix for #15802 by adding a method that prefixes representations, which will be called "recursively" for nested types.