How can I convert an object dtype structure to a string dtype? The method below is not working and the column remains object after converting to a string with <
object
I got it to work using 'string' instead of str
'string'
str
df['country'] = df['country'].astype('string') df.dtypes #country string