I am working on a project and I have created more Jupyter notebooks to specific tasks. I would like to design a summary notebook and import the functions from the previous notebooks. So, I made a simple functions.py program, in which I collected all the useful functions. I am sucessful in importing and calling the functions in the summary notebook, but I am struggling with the additional modules needed to run those functions.
My idea was to import all the necessary modules (such as pandas, numpy etc. ) in the first cell of the summary notebook, and when the imported functions want to use them, that will work. But unfortunately, the only way I can run the functions is to add the import command to each functions in functions.py.
This is the first cell of my summary notebook: The cell to import libraries
Then I call some functions from functions.py: functions
get_files, process_file, to_numeric functions all work with the pandas module, but I had to add "import pandas" to each function in functions.py. So, whilst running the cell, will pandas be imported 3 times?
Although my summary workbook works, I am not convinced there is no easier and more practical way to run it.
Could you give me some good hints, please?