You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
I am trying to transfer between pandas and polars and found this issue when loading data from pandas to polars, if I load them directly it will be no issue but from_pandas cause the issue.
The element sometime is dict and another is None. that is when the issue exists.
Reproducible example
importpandasaspdimportpolarsaspldata= [
{
"a": {
"b": None,
},
},
{"a": None},
]
# No issuedf_pandas=pd.DataFrame(data)
print(df_pandas)
# No issuedf_polars=pl.DataFrame(data)
print(df_polars)
# Here is the issuepl.from_pandas(df_pandas)
data= [
{
"a": {
"b": None,
},
},
{"a": {}},
]
# No issuepl.from_pandas(pd.DataFrame(data))
data= [
{
"a": {
"b": 1,
},
},
{"a": None},
]
# No issuepl.from_pandas(pd.DataFrame(data))
data= [
{
"a": {
"b": None,
},
},
]
# No issuepl.from_pandas(pd.DataFrame(data))
Expected behavior
I know that the data maybe is corrupted but loading them to polars directly has no issue so I am expecting same behavior in both (pl.from_pandas and pl.DataFram) either raise error in both or ignore and handle in both
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
I am trying to transfer between pandas and polars and found this issue when loading data from pandas to polars, if I load them directly it will be no issue but from_pandas cause the issue.
The element sometime is dict and another is None. that is when the issue exists.
Reproducible example
Expected behavior
I know that the data maybe is corrupted but loading them to polars directly has no issue so I am expecting same behavior in both (pl.from_pandas and pl.DataFram) either raise error in both or ignore and handle in both
Installed versions
The text was updated successfully, but these errors were encountered: