x = list(range(1, 11))
y = [i**2 for i in x]
y[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
Blog do Marcellini
June 29, 2025
โ Back to the Programming Reading Guide ๐จโ๐ป
โ Back to the Python Section ๐
โ Back to the Programming Section ๐จโ๐ป

Quarto allows the direct execution of Python code blocks in .qmd files, making it possible to create interactive and reproducible reports with analyses, plots, and visualizations in Python.
The snippet below is the YAML header of the .qmd document, which defines the title, author, date, output format, and code execution options:


| sepal_length | sepal_width | petal_length | petal_width | species | |
|---|---|---|---|---|---|
| 0 | 5.1 | 3.5 | 1.4 | 0.2 | setosa |
| 1 | 4.9 | 3.0 | 1.4 | 0.2 | setosa |
| 2 | 4.7 | 3.2 | 1.3 | 0.2 | setosa |
| 3 | 4.6 | 3.1 | 1.5 | 0.2 | setosa |
| 4 | 5.0 | 3.6 | 1.4 | 0.2 | setosa |
| sepal_length | sepal_width | petal_length | petal_width | |
|---|---|---|---|---|
| count | 150.000000 | 150.000000 | 150.000000 | 150.000000 |
| mean | 5.843333 | 3.057333 | 3.758000 | 1.198667 |
| std | 0.828066 | 0.435866 | 1.765298 | 0.763161 |
| min | 4.300000 | 2.000000 | 1.000000 | 0.100000 |
| 25% | 5.100000 | 2.800000 | 1.600000 | 0.300000 |
| 50% | 5.800000 | 3.000000 | 4.350000 | 1.300000 |
| 75% | 6.400000 | 3.300000 | 5.100000 | 1.800000 |
| max | 7.900000 | 4.400000 | 6.900000 | 2.500000 |
Slope: 1.86
Intercept: -7.10

| | sepal_length | sepal_width | petal_length | petal_width | species |
|----|----------------|---------------|----------------|---------------|-----------|
| 0 | 5.1 | 3.5 | 1.4 | 0.2 | setosa |
| 1 | 4.9 | 3 | 1.4 | 0.2 | setosa |
| 2 | 4.7 | 3.2 | 1.3 | 0.2 | setosa |
| 3 | 4.6 | 3.1 | 1.5 | 0.2 | setosa |
| 4 | 5 | 3.6 | 1.4 | 0.2 | setosa |
With Quarto and Python, it is possible to generate reports and documents rich in visual and analytical content, integrating text, code, plots, and results in an automated and elegant way.
โ Back to the Programming Reading Guide ๐จโ๐ป
โ Back to the Python Section ๐
โ Back to the Programming Section ๐จโ๐ป
๐ Back to Top
Blog do Marcellini โ Exploring Mathematics, Statistics, and Physics with Rigor and Beauty.
Created by Blog do Marcellini with โค๏ธ and code.