df = pd.read_csv("data.csv", encoding = "ISO-8859-1")
Now, I have a column where I have values are as below:
Sample data for reference:
Now, i want to convert the column a to a numeric format using below code:
df[['A']] = df[['A']].astype(int)
and it gives me an error. The problem is I have all three (nan, hyphen and comma) all in one column and need to address them together. Is there any better way to convert these without replacing (nan to -1) and things like that?