We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
In eager mode, the schema is aware of timezone conversions:
df = pl.DataFrame({"dt": [datetime.datetime(2021, 1, 1)]}) df.with_columns( pl.col("dt").dt.replace_time_zone("UTC").dt.convert_time_zone("America/New_York") ).schema {'dt': Datetime(tu='us', tz='America/New_York')}
But in lazy mode the schema does not reflect the timezone conversion:
ldf = df.lazy() ldf.with_columns( pl.col("dt").dt.replace_time_zone("UTC").dt.convert_time_zone("America/New_York") ).schema {'dt': Datetime(tu='us', tz='UTC')}
import datetime import polars as pl ldf = pl.DataFrame({"dt": [datetime.datetime(2021, 1, 1)]}).lazy() ldf.with_columns( pl.col("dt").dt.replace_time_zone("UTC").dt.convert_time_zone("America/New_York") ).schema
The schema in lazy mode should also be
{'dt': Datetime(tu='us', tz='America/New_York')}
---Version info--- Polars: 0.16.6 Index type: UInt32 Platform: macOS-13.2-arm64-arm-64bit Python: 3.10.9 (main, Feb 12 2023, 18:51:31) [Clang 14.0.0 (clang-1400.0.29.202)] ---Optional dependencies--- pyarrow: 11.0.0 pandas: 1.5.3 numpy: 1.24.2 fsspec: 2023.1.0 connectorx: <not installed> xlsx2csv: <not installed> deltalake: <not installed> matplotlib: 3.7.0
The text was updated successfully, but these errors were encountered:
thanks for reporting 🙏 working on a PR
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Polars version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
In eager mode, the schema is aware of timezone conversions:
But in lazy mode the schema does not reflect the timezone conversion:
Reproducible example
Expected behavior
The schema in lazy mode should also be
Installed versions
The text was updated successfully, but these errors were encountered: