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.
df=pl.DataFrame( [ pl.Series("a", [1, 2, 3], dtype=pl.Int64), pl.Series("b", [2, 3, 4], dtype=pl.Int64) ] ) ### Can't do df.to_struct() ## Can only do df.to_struct('')
There isn't a similar restriction on the Series initiator because we can do
pl.Series(values=[{'a':1, 'b':2}, {'a':2, 'b':4}])
No response
Should make name optional.
Should have same behavior as pl.Series constructor. It's, obviously, not a big deal but it'd be nice.
--------Version info--------- Polars: 0.19.18 Index type: UInt32 Platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 Python: 3.10.13 (main, Nov 1 2023, 14:20:38) [GCC 10.2.1 20210110] ----Optional dependencies---- adbc_driver_manager: <not installed> cloudpickle: 3.0.0 connectorx: 0.3.1 deltalake: <not installed> fsspec: 2023.10.0 gevent: <not installed> matplotlib: 3.8.1 numpy: 1.26.1 openpyxl: 3.1.2 pandas: 2.1.2 pyarrow: 14.0.0 pydantic: <not installed> pyiceberg: <not installed> pyxlsb: 1.0.10 sqlalchemy: 2.0.23 xlsx2csv: 0.8.1 xlsxwriter: 3.1.9
The text was updated successfully, but these errors were encountered:
The default Series name if not specified is indeed the empty string - doesn't seem unreasonable to be consistent here ;)
Sorry, something went wrong.
to_struct
Successfully merging a pull request may close this issue.
Checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Reproducible example
There isn't a similar restriction on the Series initiator because we can do
Log output
No response
Issue description
Should make name optional.
Expected behavior
Should have same behavior as pl.Series constructor. It's, obviously, not a big deal but it'd be nice.
Installed versions
The text was updated successfully, but these errors were encountered: