I have the following DataFrame
index word decoded_Word language
0 potato [17, 24, 1, 21, 1, 24] english
1 animal [21, 13, 23, 18, 21, 25] english
2 שלום ... hebrew
and I want to convert it to a csv file, i used the following line
df.to_csv('dataset.csv',encoding='utf8',index=False)
and get the following file
potato,[17 24 1 21 1 24],english
animals,[21 13 23 18 21 25 4],english
שלום,[21 12 6 24],hebrew
but when I execute the following code I get
data = pd.read_csv('dataset.csv')
print(type(data['decoded_word'][0]))
the result is str
I would like to know if there is better way to save/load the numpy array.
Thank you.
print(type(df['decoded_Word'][0]))is<class 'numpy.ndarray'>?