Hkesharwani
Contributor II

Hi,
There are two ways to import functions from other notebook:

  1. %run ../notebook path : This command will run the entire notebook and the function along with all the variable names will be imported. [This function should ideally be used to import the functions from another notebook, if another notebook only contains function definition]
  2. The second method to import function is for repos: In  repos we can easily  import  static .py files.
    From folder name import function.
    Refer to this documentation for more detail answer: https://www.databricks.com/blog/2021/10/07/databricks-repos-is-now-generally-available.html
Harshit Kesharwani
Data engineer at Rsystema