-
-
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
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 81.32% 80.80% -0.52%
==========================================
Files 1423 1394 -29
Lines 187177 179407 -7770
Branches 2721 2927 +206
==========================================
- Hits 152214 144975 -7239
+ Misses 34468 33927 -541
- Partials 495 505 +10 ☔ 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 |
Just a friendly ping regarding the open pull request @stinodego |
It looks good, but the Array repr has been updated. I'll send an update and this can be merged. |
266ef82
to
1742ad4
Compare
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.
I updated the Array repr and added a parametric test to make sure we will not diverge with the official repr.
Thanks for the PR!
pl.
qualifier for inner dtypes in to_init_repr
Closes #15802
This is a minimal fix for #15802 by adding a method that prefixes representations, which will be called "recursively" for nested types.