I am trying to convert this column in float type from object type but it is giving this error.
import pandas as pddf = pd.DataFrame({'col1': ['[-0.8783137, 0.05478287, -0.08827557, 0.69203985, 0.06209986]', '[0.31444644, -0.6546649, 0.7211526, 0.9819127, 0.74042267]']})df['col1'] = df['col1'].apply(lambda x: [float(i) for i in x.strip('[]').split(',')])
df = df.astype(float)
print(df)