Created
May 29, 2024 12:07
-
-
Save tchiavegatti/7ce25c948d548d0e573ecbf7546768f7 to your computer and use it in GitHub Desktop.
Remove punctuation, accents and put into lower case
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def strip_accents_and_lower(s): | |
return ''.join(c for c in unicodedata.normalize('NFD', s) if unicodedata.category(c) != 'Mn').lower() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment