Apr
06

How to reference python variable in jupyter notebook markdown cell

  1. Install Jupyter notebook extension plugin: https://github.com/ipython-contrib/jupyter_contrib_nbextensions
    1. conda install -c conda-forge jupyter_contrib_nbextensions
    2. jupyter contrib nbextension install --user
  2. Go to Jupyter notebook
    1. click Nbextensions
    2. enable Python Markdown
  3. use {{python variable}} in markdown cell. 🙂

Written by connygy. Posted in python, Tools

Trackback from your site.

Comments (1)

  • Javier
    2017-07-12 at 12:02 pm |

    I think that the second step is not necessary. Check http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html:

    “Conda
    There are conda packages for the notebook extensions and the jupyter_nbextensions_configurator available from conda-forge. You can install both using

    conda install -c conda-forge jupyter_contrib_nbextensions
    This also automatically installs the Javascript and CSS files (using jupyter contrib nbextension install –sys-prefix), so the second installation step below can therefore be skipped.”

Leave a comment