import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
x = np.linspace(-3, 3, 1000)
pdf = norm.pdf(x, 0, 1)
plt.plot(x, pdf, label='Normal Distribution')
plt.show()
You can choose to render a document in multiple formats (see </> Code on the top right).
For instance, this file is rendered both in html and ipynb.
So now, you can download your file notebook.ipynb and then load it on Jupyter.
---
title: "Notebook example"
description: example of python notebook
format:
html:
toc: true
toc-location: left
toc-expand: 3
code-tools: true
ipynb:
output-file: notebook.ipynb
jupyter: python3
execute:
eval: true
from: markdown+emoji
---
## Before you start
You can choose to render a document in multiple formats (see `</> Code` on the top right).
For instance, this file is rendered both in *html* and *ipynb*.
So now, you can download your file [notebook.ipynb](notebook.ipynb){target="_blank"} and then load it on Jupyter.
## Python cells
### A python cell that will not be executed
```{.python}
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
x = np.linspace(-3, 3, 1000)
pdf = norm.pdf(x, 0, 1)
plt.plot(x, pdf, label='Normal Distribution')
plt.show()
```
### A python cell to be executed if eval: true
```{python}
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
x = np.linspace(-3, 3, 1000)
pdf = norm.pdf(x, 0, 1)
plt.plot(x, pdf, label='Normal Distribution')
plt.show()
```