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
import polars as pl df = pl.LazyFrame({'id':[1,1,2,2,3,3],'b':[11,None,33,44,None,66]}) print('ok: ',df.group_by('id').agg(pl.col('b').sum()).collect_schema()) print('not ok:',df.group_by('id').agg(pl.col('b').sum().fill_null(0)).collect_schema())
ok: Schema([('id', Int64), ('b', Int64)]) not ok: Schema([('id', Int64), ('b', List(Int64))])
Upon aggregation, if I add .fill_null(0) to an Int64 column, then its datatype changes to List(Int64).
Data type should not change with a .fill_null() addition.
--------Version info--------- Polars: 1.14.0 Index type: UInt32 Platform: Linux-5.10.223-212.873.amzn2.x86_64-x86_64-with-glibc2.26 Python: 3.9.20 | packaged by conda-forge | (main, Sep 30 2024, 17:49:10) [GCC 13.3.0] LTS CPU: False ----Optional dependencies---- adbc_driver_manager <not installed> altair <not installed> boto3 1.35.63 cloudpickle 3.1.0 connectorx <not installed> deltalake <not installed> fastexcel <not installed> fsspec 2024.10.0 gevent <not installed> google.auth 2.36.0 great_tables <not installed> matplotlib <not installed> nest_asyncio 1.6.0 numpy 1.26.4 openpyxl <not installed> pandas 1.5.3 pyarrow 14.0.2 pydantic <not installed> pyiceberg <not installed> sqlalchemy <not installed> torch <not installed> xlsx2csv <not installed> xlsxwriter <not installed>
The text was updated successfully, but these errors were encountered:
collect_schema
.dt.*
group_by
collect_schema()
fill_null()
nameexhaustion
Successfully merging a pull request may close this issue.
Checks
Reproducible example
Log output
Issue description
Upon aggregation, if I add .fill_null(0) to an Int64 column, then its datatype changes to List(Int64).
Expected behavior
Data type should not change with a .fill_null() addition.
Installed versions
The text was updated successfully, but these errors were encountered: