在 Google Colab 中将 ipynb 笔记本转换为 HTML [英] Convert ipynb notebook to HTML in Google Colab
问题描述
我有一个用于数据分析的 Google Colaboratory Notebook,我想将其输出为 HTML 文件,因为目前并非所有内容都在 Colab 环境中加载,例如大型 Folium 热图.是否可以将笔记本导出为 html 文件而不是 ipynb 和 py 选项?
Google Colab 目前没有内置功能.</p>
你最好的方法是首先通过File>下载它.下载.ipynb
,然后使用标准的Jupyter Notebook转换工具,nbconvert
:
jupyter nbconvert --to html notebook.ipynb
如果您使用 Anaconda Python 发行版,nbconvert
很可能已经安装.如果没有,请参阅他们的安装说明中描述的内容,以便能够转换:
pip install nbconvert# 或者conda 安装 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!