I saved this function so I can reuse it many Jupyter Notebooks with out having to define every time for each notebook.
def strip_accents(s):
return ''.join(c for c in unicodedata.normalize('NFD', s)
if unicodedata.category(c) != 'Mn')
I can import it fine to my Jupyter Notebook, but it wont work and I get this error.
NameError: name 'unicodedata' is not defined
even though I have imported unicodedata in the notebook. Functions that don't rely on an outside module work fine. My question is how I can load my functions that rely on outside modules so that they run.
question from:
https://stackoverflow.com/questions/65928339/loading-custom-functions-in-jupyter-notebook 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…