pythonjupyter-notebookgoogle-colaboratory

Convert ipynb notebook to HTML in Google Colab


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?


Solution

  • 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