As you can see my df contains a price list with values like $106.00 and '1,190.00. I want to get the values to a numeric value. So I want to replace the $ sign. But that didn't work.
df = pd.DataFrame({'id':['A', 'B', 'C', 'D', 'E'], 'price':['$106.00', '$156.00',
'$166.00', '$106.00', '1,190.00']})
df['price'] = pd.to_numeric(df.price.str.replace("$",""))
# df['price'] = pd.to_numeric(df.price.str[1:])
# that givs me a ValueError: Unable to parse string "1,925.00" at position 7765
What I want at the end
ID price
A 106.00
B 156.00
C 166.00
D 106.00
E 1,190.00