I have a column with the datatype 'object', but it actually contains numbers (408, 415, 510) with no missing values. I want to convert this to integer with the code below, but I get the error: invalid literal for int() with base 10: 'A415' (I added the first line of code after reading other posts, but I get the same error even if I drop the first line of code).
df['Area Code'] = df['Area Code'].astype(str)
df['Area Code'] = df['Area Code'].astype(int)
print(df['Area Code'].dtypes)