Jupyter Notebook: Import .ipynb file and access it's method in other .ipynb file giving error

后端 未结 2 883
误落风尘
误落风尘 2021-01-18 15:52

I am fairly new to Jupyter Notebook. I have played around with it for a while. But this was my first time trying to import another notebook into my main class.

For r

2条回答
  •  深忆病人
    2021-01-18 16:13

    Simple way to use ipynb files in jupyter note book are as follows:

    1) Install import-ipynb

    pip install import-ipynb
    

    2) Import import_ipynb in jupyter notebook. Then import ipynb file as you import .py file

    import import_ipynb
    from test import print_name
    
    print_name("your name")
    

提交回复
热议问题