How to reference python variable in jupyter notebook markdown cell
- Install Jupyter notebook extension plugin: https://github.com/ipython-contrib/jupyter_contrib_nbextensions
-
conda install -c conda-forge jupyter_contrib_nbextensions
-
jupyter contrib nbextension install --user
-
- Go to Jupyter notebook
- click Nbextensions
- enable Python Markdown
- use {{python variable}} in markdown cell. 🙂
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.”
Hi Javier, sorry, I read this comment later, thanks very much for the mention. I will correct the post later! 🙂
Excellent Post! Exactly what I needed! Thanks!