Рассмотрите этот код:
Код: Выделить всё
df = pd.DataFrame({ "the_column": [{ "key" : 123 }, { "foo" : 456 }, { "bar" : 789 }]})
Код: Выделить всё
the_column
0 {'key': 123}
1 {'foo': 456}
2 {'bar': 789}
Код: Выделить всё
>>> pl.from_pandas(df)
shape: (3, 1)
┌─────────────────┐
│ the_column │
│ --- │
│ struct[3] │
╞═════════════════╡
│ {null,null,123} │
│ {null,456,null} │
│ {789,null,null} │
└─────────────────┘
Код: Выделить всё
>>> pl.from_pandas(df, schema_overrides = {'the_column': pl.Object })
InvalidOperationError: casting from Int64 to Unknown not supported
Подробнее здесь: https://stackoverflow.com/questions/758 ... -with-obje