Jupyter Notebook: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
No edit summary
No edit summary
Line 23: Line 23:


https://voila.readthedocs.io/en/stable/index.html
https://voila.readthedocs.io/en/stable/index.html
== Tables in put put ==
ref: https://stackoverflow.com/questions/35160256/how-do-i-output-lists-as-a-table-in-jupyter-notebook
also: https://pypi.python.org/pypi/tabulate
<pre>
from IPython.display import HTML, display
import tabulate
table = [["Sun",696000,1989100000],
        ["Earth",6371,5973.6],
        ["Moon",1737,73.5],
        ["Mars",3390,641.85]]
display(HTML(tabulate.tabulate(table, tablefmt='html')))
</pre>

Revision as of 15:48, 17 November 2021

install ( mac)
pip install jupyterlab
run
jupyter notebook --no-browser --ip 0.0.0.0 --port 5000
jupyter notebook --no-browser --ip 0.0.0.0 --port 5000 --log-level=DEBUG

inline image:

possibly this:

%matplotlib inline

possibly this:

from IPython.display import Image

To Read

https://voila.readthedocs.io/en/stable/index.html

Tables in put put

ref: https://stackoverflow.com/questions/35160256/how-do-i-output-lists-as-a-table-in-jupyter-notebook

also: https://pypi.python.org/pypi/tabulate

from IPython.display import HTML, display
import tabulate
table = [["Sun",696000,1989100000],
         ["Earth",6371,5973.6],
         ["Moon",1737,73.5],
         ["Mars",3390,641.85]]
display(HTML(tabulate.tabulate(table, tablefmt='html')))