I have a notebook at https://github.com/hawan2020/Test.git . I want to call UDF functions in notebook (while running it on Binder) which are saved in the repository as .py file. How can i call those functions. An example testpy.py function is uploaded.
Any thoughts how can i accomplish this.
Go to https://mybinder.org/v2/gh/hawan2020/Test/master
Once the session launches, open a new notebook.
Paste the following into a cell:
import testpy as t
The function will return the expected result.
One thing to look out for though is that
import won’t reimport the file even if it had been changed since the first time it was imported into the environment when it first encountered the
import call. Restarting the notebook kernel after a change is one work-around. You’ll want to read here and decide what works for you if the file containing the user-defined function will be edited during the session.
Thanks for the reply. It is as simple as you have mentioned. I guess re-importing was the problem.