polars
polars copied to clipboard
dtype=pl.Object not respected when converting pandas object Series
Checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of Polars.
Reproducible example
>>> pl.Series(pd.Series([1], dtype=object), dtype=pl.Object)
shape: (1,)
Series: '' [i64]
[
1
]
>>> pl.Series(pd.Series([], dtype=object), dtype=pl.Object)
shape: (0,)
Series: '' [str]
[
]
>>> pl.Series(pd.Series([np.nan], dtype=object), dtype=pl.Object)
shape: (1,)
Series: '' [null]
[
null
]
>>> pl.Series(pd.Series([None], dtype=object), dtype=pl.Object)
shape: (1,)
Series: '' [str]
[
null
]
Log output
No response
Issue description
dtype=pl.Object is not respected when converting pandas object Series to polars.
Expected behavior
The dtype for all of these should be pl.Object.
Installed versions
Replace this line with the output of pl.show_versions(). Leave the backticks in place.
Thanks, this should indeed be fixed. This will be resolved as part of #14427