I have a dataframe where one of the columns contains a list of values:
example:
type(df['col_list'].values[0]) = list
I saved this dataframe as csv file (df.to_csv('my_file.csv'))
When I load the dataframe (df = pd.read_csv('my_file.csv'))
the column which contains list of values change to string type:
type(df['col_list'].values[0]) = str
When converting to list (list(df['col_list'].values[0]) I'm getting list of characters instead of list of values.
How can I save/load dataframe which one of it's columns contains list of values ?
listcolumn as it is incsv. My pandas version:'1.2.3'. What version are you on?