using MyST syntax with triple backticks - here with replite
we can in theory get a REPL
replite
- Unknown Directive
replite
- Unknown Directive:kernel: python :theme: JupyterLab Light :width: 100% :height: 500px :prompt: click to start a replite with numpy :prompt_color: gray # please be patient ... import sys major, minor, *_ = sys.version_info print(f"Hello from a JupyterLite console! in Python {major}.{minor}\n") import numpy as np print(np.arange(9).reshape((3, 3)))
inside dropdowns¶
like for images this needs to go inside a {div}
thingy
demo’ing pandas as well... NOTE that here titanic.csv
is under data/
in the git repo, but we configure jupyterlite-sphinx
to take its contents from data/
and eventually titanic.csv
is in .
inside the jlite runtime environment)
a hidden repl with pandas this time
replite
- Unknown Directive
replite
- Unknown Directive:kernel: python :theme: JupyterLab Light :width: 100% :height: 500px :prompt: click for a pandas example :prompt_color: pink print('Hello from a JupyterLite console!') import pandas as pd df = pd.read_csv("titanic.csv", index_col="PassengerId") df.head()