I am trying to precalculate sentence embeddings and I want to store it in a csv file, so that I can reuse it later. I create a Pandas dataframe, and I have the embeddings stored correctly as a 2d array of floats (et or the ea column).
relevant_df.head()
I then run the to_csv function to store this in memory. When I load this csv file, the 2d arrays have now changed into a single string. I am not being able to use the embeddings due to this
relevant_df.to_csv('relevant_docs.csv', index=False)df = pd.read_csv('relevant_docs.csv')df.head()
Any help will be appreciated. Thanks!