我有多个笔记本。我想将它们合并到一个python程序中。你能告诉我最好的方法吗?
示例场景:
notebook1 ( has 2 dataframes):
x , y
Notebook2 ( has 2 dataframes basically susbsets of notebook1 data frames):
x1 = x['xxx'] >0
y1= y['xxx'] >0
Notebook3 (has 3 dataframes):
z,z1,z2
Notebook4: (uses all the dataframes from previous notebooks and performs operations).
output=x*z*z1*y1
创建说“exec.py”的最佳方法是什么,基本上使用所有笔记本并给出最终输出?
我可以将每个笔记本转换为python程序,还是将每个笔记本转换为函数?
请提供您的见解。非常感谢。
答案 0 :(得分:1)
你可以用script写的这个简单而优雅的Fernando Pérez来做到这一点。该脚本将许多Jupyter笔记本合并为一个。
我已经尝试过,它对我有用。我希望它可以帮助你。