I have a dictionary of nested columns with the index as key in each one. When i try to convert it to a polars dataframe, it fetches the column names and the values right, but each column has just one element that's the dictionary of the column elements, without "expanding" it into a series.
An example, let's say i have:
d = {'col1': {'0':'A','1':'B','2':'C'}, 'col2': {'0':1,'1':2,'2':3}}
Then, when i do a pl.DataFrame(d) or pl.from_dict(d), i'm getting:
col1 col2
--- ---
struct[3] struct[3]
{"A","B","C"} {1,2,3}
Instead of the regular dataframe.
Any idea how to fix this?
Thanks in advance!