I am trying to convert all the elements of two pandas series from a pandas data frame, which aren't ascii characters to ascii. Simply apply the function to the relevant columns doesnt work. Python only shows an attribute error stating that 'series' object has no attribute encode.
import pandas as pd
import numpy as np
from unidecode import unidecode
try_data=pd.DataFrame({
'Units': np.array([3,4,5,6,10],dtype='int32'),
'Description_PD': pd.Categorical(['VEIJA 5 TRIÂNGULOS 200','QUEIJO BOLA','QJ BOLA GRD','VEIJO A VACA TRIÂNGULOS 100','HEITE GORDO TERRA']),
'Description_Externa' : pd.Categorical(['SQP 4 porções', 'Bola', ' SIESTA BOLA', 'SQP 16 porções', 'TERRA NOSTRA'])
})
try_data[['Description_PD','Description_Externa']].apply(unidecode)