Ajout du journal de bord

parent e8d4c9bf
......@@ -108,7 +108,32 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"\n",
"# Création d’un mini journal de bord\n",
"data = {\n",
" \"Jour\": [\"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\"],\n",
" \"Heures_étude\": [2, 3.5, 4, 2.5, 3],\n",
" \"Thème\": [\"Python\", \"Jupyter\", \"Statistiques\", \"Graphiques\", \"Journal\"]\n",
"}\n",
"\n",
"df = pd.DataFrame(data)\n",
"\n",
"# Afficher le tableau\n",
"display(df)\n",
"\n",
"# Calcul de la moyenne d’heures d’étude\n",
"print(\"Moyenne des heures d’étude :\", round(df[\"Heures_étude\"].mean(), 2))\n",
"\n",
"# Affichage graphique\n",
"plt.plot(df[\"Jour\"], df[\"Heures_étude\"], marker='o', color='blue')\n",
"plt.title(\"Temps d’étude par jour\")\n",
"plt.xlabel(\"Jour\")\n",
"plt.ylabel(\"Heures\")\n",
"plt.show()"
]
}
],
"metadata": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment