jupyter notebook生成py文件

在一个jupyter notebook中代码最后写入:并将jupyter notebook的文件名称也改为设定的文件名,最后执行以下代码即可生成。

try:
    !jupyter nbconvert --to python 文件名
except:
    pass

 

posted on 2020-07-13 10:46  吱吱了了  阅读(2869)  评论(0)    收藏  举报

导航