pandas.Series.str.normalize#

Series.str.normalize(form)[source]#

Return the Unicode normal form for the strings in the Series/Index.

For more information on the forms, see the unicodedata.normalize().

Parameters:
form{‘NFC’, ‘NFKC’, ‘NFD’, ‘NFKD’}

Unicode form.

Returns:
Series/Index of objects

Examples

>>> ser = pd.Series(['ñ'])
>>> ser.str.normalize('NFC') == ser.str.normalize('NFD')
0   False
dtype: bool