-
-
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
polars.selectors.temporal()
doesn't include datetime columns
#13665
Comments
@alexander-beedie fancy taking a look? |
Looks like it's not selector specific: df = pl.DataFrame({
"a": pl.Series([datetime(2024, 1, 1)], dtype=pl.Datetime("us", "UTC")),
})
print(df.select(pl.col(pl.Datetime)))
|
That one shouldn't, as it's equivalent to About to commit a fix that covers DATETIME_DTYPES, TEMPORAL_DTYPES, and the |
@alexander-beedie df = pl.DataFrame({
"a": pl.Series([datetime(2024, 1, 1)], dtype=pl.Datetime),
}).select(
pl.col(pl.Datetime(time_zone="*"))
)
Also, shouldn't we enable df = pl.DataFrame({
"a": pl.Series([datetime(2024, 1, 1)], dtype=pl.Datetime("ms")),
}).select(
pl.col(pl.Datetime)
)
I know we can use |
@mcrumiller: selectors help insulate you from the lower-level matching logic:
Note: all of the expressions above can also be negated using |
polars.selector.temporal()
doesn't include datetime columnspolars.selectors.temporal()
doesn't include datetime columns
Checks
Reproducible example
Log output
No response
Issue description
polars.selector.temporal()
doesn't include datetime columns, as the example shows. It includesdate
columns, tho, so it is not clear what is the criteria for a column to be considered temporal.Expected behavior
I would expect that
date_id_datetime
is also included, as with version 0.19.13.Installed versions
The text was updated successfully, but these errors were encountered: