I have a df where a column is array where each cell is 1*50 dimension and there are 20 rows.
import pandas as pd
df = pd.DataFrame(zip(list(range(0, 20, 1)), np.random.rand(20, 50)),
columns=['id', 'array'])
At this point there is no issue to use the array column for any array operations (addition, multiplication, division etc) with other array.
But if one saves the df as csv and reads it in another notebook (which I don't have a good way to demo here), each cell in the array column turns into list wrapped strings and using either ast literal_eval or to_numpy doesn't help.
'[1.2 -2.3 2.1 ... 4.1]'
How to prevent array turning into strings here?