问题描述
我有一个用于数据分析的Google合作实验室笔记本,我想将其输出为HTML文件,因为目前并不是所有的合作实验室环境(例如大型Folium Heatmaps)都加载到Colab环境中.是否可以将笔记本导出为html文件而不是ipynb和py选项?
Google Colab当前不具有内置功能.
您最好的方法是先通过 File>下载它.下载.ipynb
,然后使用Jupyter Notebook转换的标准工具 nbconvert
:
jupyter nbconvert-至html notebook.ipynb
如果您使用Anaconda Python发行版,则很可能已经安装了 nbconvert
.如果不是,请参阅其安装说明中描述的内容,以便能够进行转换:
pip install nbconvert# 或者康达安装nbconvert
I have a Google Colaboratory Notebook for Data Analysis that I want to output as a HTML file as currently not everything loads within the Colab environment such as large Folium Heatmaps. Is it possible to export the notebook as a html file as opposed to the ipynb and py options?
Google Colab doesn't currently have such a feature as a built-in.
Your best route is to first download it through File > Download .ipynb
and then use the standard tool for Jupyter Notebook conversion, nbconvert
:
jupyter nbconvert --to html notebook.ipynb
If you use an Anaconda Python distribution, nbconvert
is most likely already installed. If not, refer to what is described in their install instructions to be able to convert:
pip install nbconvert
# OR
conda install nbconvert
这篇关于在Google Colab中将ipynb笔记本转换为HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!