Export Jupyter to HTML | PDF

Published: 03 October 2022
on channel: Python 360
23,062
134

How to export a Jupyter Notebook to HTML with Plotly graphs included.
By default the graphs/charts don't appear. Same with export to PDF.

This code fixes :
◼️ nbconvert failed: Pyppeteer is not installed to support Web PDF conversion. Please install `nbconvert[webpdf]` to enable.

◼️ nbconvert failed: No suitable chromium executable found on the system. Please use '--allow-chromium-download' to allow downloading one.

🌏 If you want a fast VPS server with Python installed check out :
https://webdock.io/en?maff=wdaff--170

Pytest with FastAPI course on "TestDriven.io":
-------------------------------------------------------------------------
https://testdriven.io/courses/tdd-fas...
https://testdriven.io/courses/scalabl...
https://testdriven.io/courses/fastapi...

code :
---------
import pandas as pd
import plotly.express as px

2 lines below for html export
import plotly.io as pio
pio.renderers.default ='notebook'

2 lines below for PDF export
!pip install Pyppeteer
!pyppeteer-install

Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?

You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! 👍

🌏 10% off ScraperAPI : https://www.scraperapi.com?fpr=ken49
◼️ Coupon Code: DRPI10

Thumbs up yeah? (cos Algos..)

#jupyternotebook #tutorial #pythonprogramming


Watch video Export Jupyter to HTML | PDF online, duration hours minute second in high quality that is uploaded to the channel Python 360 03 October 2022. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 23,062 times and liked it 134 visitors.