如何从Jupyter的笔记本中调用.py文件中的功能



我有一个定义一些函数(或方法)的.py文件。如何从Jupyter的笔记本中调用这些功能。

我认为可能是这样的:

 from name_file.py import name_function

(现在我可以使用name_fuction功能)

或对于所有功能:

import name_file.py

(现在我可以使用name_file.name_fuction函数)

最新更新