I got this error when trying to convert pandas column price to integer. I've attached the code problem Can you help please?
CodePudding user response:
You're getting this error because the price column isn't of string type to begin with
CodePudding user response:
change the type of a dataframe column using "astype" method.
car_sales['Price'].astype(int)
in general:
df['column_name'].astype(type)