Unable to parse string "3,906.00" at position 0 I tried:
df["sales"]=df["sales"].str.replace(",","").astype(int)
then ,it turns out this:
Unable to parse string "3906.00" at position 0
CodePudding user response:
IIUC use:
df["sales"]=df["sales"].str.replace(",","").astype(float).astype(int)