How to create a polars data frame from a dictionary which has unequal length values?
I have a dictionary as:
ex_dict = {'A': ['false',
'true',
'false',
'false',
'false',
'true',
'true',
'false',
'false'],
'B': ['false',
'false',
'true',
'false',
'false',
'false'],
'C': ['false',
'true',
'true',
'false',
'false',
'false',
'false',
'false',
'true']}
I'm creating a dataframe as:
pl.DataFrame(ex_dict)
on executing it gives an error as:
ShapeError: Could not create a new DataFrame from Series. The Series have different lengths.Got [shape: (9,)
How to create a polars dataframe in these scenarios ?
Comments
Post a Comment