-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(python,rust): extend dtype/selector matching for Datetime
with a "*" wildcard for timezones
#9641
feat(python,rust): extend dtype/selector matching for Datetime
with a "*" wildcard for timezones
#9641
Conversation
… "*" wildcard for timezones
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.
cool! love how ergonomics keep improving
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.
Nice ergonomic change. I think we must go through with this, but with a slightly different implementation. See comment.
33b4fb4
to
8a4b8f8
Compare
8a4b8f8
to
af806a0
Compare
57b734c
to
b094d7b
Compare
… a "*" wildcard for timezones (pola-rs#9641)
Closes #5300.
Allows the
pl.DATETIME_DTYPES
group to cover all timeunit/timezone combinations.Further enhances the
cs.datetime
selector so that it can handle arbitrary permutations of timeunit/timezone, eg:cs.datetime()
→ any timeunit, any (or no) timezonecs.datetime( time_zone="*" )
→ any timeunit, any timezone (but must have a timezone)cs.datetime( time_zone=None )
→ any timeunit, no timezonecs.datetime( ["ms","ns"], time_zone="UTC" )
→ any col with UTC timezone and ns or ms precisioncs.datetime( time_zone=["UTC","Asia/Tokyo","Europe/London"] )
→ any timeunit, one of the given timezones(Note: all of the expressions above could also be negated using
~
).Finally adds the missing piece to the Datetime dtype selection puzzle that has been timezones... :)