I have an n-by-m Pandas DataFrame
>>> df = DataFrame(columns=['col1'])
>>> df.append(Series([None]), ignore_index=True)
>>> df['column1'] = [1.23, 2.34]
0 [1, 2]
As you pointed out, this can commonly happen when saving and loading pandas DataFrames as
.csv files, which is a text format.
In your case this happened because list objects have a string representation, allowing them to be stored as
.csv files. Loading the
.csv will then yield that string representation.
If you want to store the actual objects, you should you use
DataFrame.to_pickle() (note: objects must be picklable!).
To answer your second question, you can convert it back with
>>> from ast import literal_eval >>> literal_eval('[1.23, 2.34]') [1.23, 2.34]