I have a pandas dataframe with a column of vectors that I would like to perform matrix arithmetic on. However, upon closer inspection the vectors are all wrapped as strings with new line characters seemingly embedded in them:
How do I convert each vector in this column into numpy arrays? I've tried
df['Word Vector'].as_matrix
and
np.array(df['Word Vector'])
as well as
df['Word Vector'] = df['Word Vector'].astype(np.array)
but none produced the desired result. Any pointers would be appreciated!
