Here, you can append to the system path which is the most efficient and cleanest way of importing code into a notebook without lots of module boilerplate and a pip -e install.
Also, you should use the %autoreload and %aimport, magics with the above as shown in the code below.
# Load the "autoreload" extension
# always reload modules marked with "%aimport"
# add the 'src' directory as one where we can import modules
src_dir = os.path.join(os.getcwd(), os.pardir, 'src')
# import my method from the source code
If you want some hands on Data Science then you can watch this video tutorial on Data Science Project for Beginners.
If you wish to learn more about how to use python for data science, then go through data science python programming course by Intellipaat for more insights.