Hello guys!
I have converted the data type column from object to string in a dataframe with data loaded from an excel file loaded with pd.read_excel(....
df_list["País"]=df_list["País"].astype("string"). It works OK.
However, when I list the content of column it shows me the strings with a b' prefix in strings.
I have tried to convert from byte-string to string using:
df_list["País"]=df_list["País"].str.decode("utf-8") but I get this msg error: AttributeError: 'str' object has no attribute 'decode'
I will appreciate any help.
Thanks in advance
I have converted the data type column from object to string in a dataframe with data loaded from an excel file loaded with pd.read_excel(....
df_list["País"]=df_list["País"].astype("string"). It works OK.
However, when I list the content of column it shows me the strings with a b' prefix in strings.
I have tried to convert from byte-string to string using:
df_list["País"]=df_list["País"].str.decode("utf-8") but I get this msg error: AttributeError: 'str' object has no attribute 'decode'
I will appreciate any help.
Thanks in advance