Import .py from different directory into notebook

PHOTO EMBED

Fri Oct 21 2022 00:12:22 GMT+0000 (Coordinated Universal Time)

Saved by @jmbenedetto #python

import sys
directory_path = os.path.abspath(os.path.join('../code_shared'))
if directory_path not in sys.path:
    sys.path.append(directory_path)
import params_file as pf
import functions_file as ff
content_copyCOPY

https://skaf.medium.com/import-python-files-into-jupyter-notebook-while-being-in-another-directory-393e1bf76637