-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Extend allowed types of the categories
arg of dy.Enum
#138
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #138 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 49 49
Lines 2812 2818 +6
=========================================
+ Hits 2812 2818 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
categories
arg of dy.Enum
categories
arg of dy.Enum
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.
Neat, looks great, thanks @jjurm! I think it's fine to represent the categories as series, I can't come up with a downside and we mirror the polars API this way. Would love to hear a second opinion on this by @AndreasAlbertQC or @delsner though 😄
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 for the PR @jjurm! Personally, I'd have gone for list
, but I also don't think it's super important 🤷
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.
Let's go!
Motivation
This makes the
categories
argument accept the same types as inpl.Enum
, making it easier to convert from polars dtypes to dataframely dtypes.Fixes #136.
Changes
dy.Enum.categories
is now stored as apl.Series
- happy to think of another solution if you don't think we should convert all sequences to series. However, this is what polars does internally anyway oncedy.Enum.dtype
is called.