In R would make this in this way iconv('Arapeí', to="ASCII//TRANSLIT")
, so is there any simple way to do this in Python?
In R would make this in this way iconv('Arapeí', to="ASCII//TRANSLIT")
, so is there any simple way to do this in Python?
Use unidecode:
$ pip install unidecode
from unidecode import unidecode
print(unidecode('Arrepieí'))
Arrepiei
str = 'café'
print(unidecode(str))
cafe
Use unidecode:
from unicodedata import normalize
source = 'Arapeí'
target = normalize('NFKD', source).encode('ASCII','ignore').decode('ASCII')
print(target)