nbconvert

how to programmatically add slides cell metadata in jupyter notebooks?

how to programmatically add slides cell metadata in jupyter notebooks? Question: Jupyter notebooks has a way of visualizing cell metadata so that you are able to parametrize how will cells look like when you export the notebook into slides using nbconvert. Example: For instance, I would like to programmatically add that metadata into cells without …

Total answers: 1

How to remove date from pdf produced from ipynb with nbconvert

How to remove date from pdf produced from ipynb with nbconvert Question: I am using nbconvert programmatically to export a jupyter notebook file to pdf: import nbformat from nbconvert.exporters import PDFExporter from nbconvert.preprocessors import TagRemovePreprocessor from traitlets.config import Config c = Config() c.TagRemovePreprocessor.remove_cell_tags = ("remove_cell",) c.PDFExporter.preprocessors = ["nbconvert.preprocessors.TagRemovePreprocessor"] c.PDFExporter.exclude_input_prompt = True c.PDFExporter.exclude_output_prompt = True c.PDFExporter.exclude_input …

Total answers: 2

Jupyter Notebook nbconvert without magic commands/ w/o markdown

Jupyter Notebook nbconvert without magic commands/ w/o markdown Question: I have a Jupyter notebook and I’d like to convert it into a Python script using the nbconvert command from within the Jupyter notebook. I have included the following line at the end of the notebook: !jupyter nbconvert –to script <filename>.ipynb This creates a Python script. …

Total answers: 4

convert jupyter notebook saved as .HTML file back into .IPYNB

convert jupyter notebook saved as .HTML file back into .IPYNB Question: Can I convert a Jupyter Notebook saved as .HTML file back into .IPYNB file? The executable original notebooks were lost. The nbconvert docs don’t have anything useful for this case. Currently I have to copy-paste bunch of cells into a new notebook, but this …

Total answers: 1

Convert JSON IPython notebook (.ipynb) to .py file

Convert JSON IPython notebook (.ipynb) to .py file Question: How do you convert an IPython notebook file (json with .ipynb extension) into a regular .py module? Asked By: Nitesh Selkari || Source Answers: According to https://ipython.org/ipython-doc/3/notebook/nbconvert.html you are looking for the nbconvert command with the –to script option. ipython nbconvert notebook.ipynb –to script Answered By: …

Total answers: 18

How to run an .ipynb Jupyter Notebook from terminal?

How to run an .ipynb Jupyter Notebook from terminal? Question: I have some code in a .ipynb file and got it to the point where I don’t really need the “interactive” feature of IPython Notebook. I would like to just run it straight from a Mac Terminal Command Line. Basically, if this were just a …

Total answers: 13

export notebook to pdf without code

export notebook to pdf without code Question: I have a large notebook with a lot of figures and text. I want to convert it to a html file. However, I don’t want to export the code. I am using the following command ipython nbconvert –to html notebook.ipynb But this option also exports the code. Is …

Total answers: 6

Jupyter (IPython) notebook: Convert an HTML notebook to ipynb

Jupyter (IPython) notebook: Convert an HTML notebook to ipynb Question: I have converted a Jupyter/IPython notebook to HTML format and subsequently lost the original ipynb file. Is there a simple way to generate the original notebook file from the converted HTML file? Asked By: foglerit || Source Answers: I recently used BeautifulSoup and JSON to …

Total answers: 2