I have a csv file that looks like this:
table = {'column1': [1,2,3],
'column2': ['(0.2, 0.02, NaN)','(0.0, 0.03, 0)','(0.1, NaN, 1)']}
df = pd.DataFrame(table)
I am trying to access to the array that is stored in "column2", however pandas says that "column2" is an object and therefore if I print df['column2'][0][0], I get '(' instead of "0.2".
How can I change the data type from "object" to numeric values?
I tried this
pd.to_numeric(df['column2'][0])
but it didn't work.