The application I use generates data in a dataframe which I need to use upon request.
It looks similar to this.
<class 'pandas.core.frame.DataFrame'>
E Gg gnx2 J chs lwave J_ID
0 27.572025 82.308581 7.078391 3.0 1 [0] 1
1 46.387728 77.029548 58.112338 3.0 1 [0] 1
2 75.007554 82.087407 0.535442 3.0 1 [0] 1
Everything worked perfectly while I didn't try to use dataframes saved in separate files before. Because when I am trying to use the data after loading - I got errors about data types for the columns which contain arrays. (lvawe for example) is an array and when saved in csv the information about data type is lost.
#saving the data to csv
csv_filename = "ladder.csv"
ladder.to_csv(csv_filename)
So when loading a dataframe next time to use the data I can't get access to array elements like it should.
Because as I understand data in this column is loaded like string. After loading the data through load_csv I get this for the data types:
Unnamed: 0 int64
E float64
Gg float64
gnx2 float64
J float64
chs int64
lwave object
J_ID int64
dtype: object
How can I resolve this issue? How can I correctly load the data with the correct data type or maybe explicitly assign a data type to a column after loading?