resultb

parent 66a66781
......@@ -113,7 +113,7 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": 7,
"metadata": {},
"outputs": [
{
......@@ -164,36 +164,38 @@
"data['Date'] = pd.to_datetime(data['Date'])\n",
"# Extrayez l'année de la colonne 'Date' et créez une nouvelle colonne 'Année'\n",
"data['Year'] = data['Date'].dt.year\n",
"# Affichage des premières lignes des données pour vérification\n",
"print(data.head())"
]
},
{
"cell_type": "code",
"execution_count": 51,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Date Concentration Year Mean_CO2_Concentration Oscilation\n",
"0 1958-03-29 316.19 1958 315.474 0.716\n",
"1 1958-04-05 317.31 1958 315.474 1.836\n",
"2 1958-04-12 317.69 1958 315.474 2.216\n",
"3 1958-04-19 317.58 1958 315.474 2.106\n",
"4 1958-04-26 316.48 1958 315.474 1.006\n"
" Date Concentration Year Mean_CO2_Concentration\n",
"0 1958-03-29 316.19 1958 315.474\n",
"1 1958-04-05 317.31 1958 315.474\n",
"2 1958-04-12 317.69 1958 315.474\n",
"3 1958-04-19 317.58 1958 315.474\n",
"4 1958-04-26 316.48 1958 315.474\n"
]
}
],
"source": [
"# Contribution lente. Calculez la valeur moyenne par an et créez une nouvelle colonne 'Concentration moyenne de CO2'\n",
"data['Mean_CO2_Concentration'] = data.groupby('Year')['Concentration'].transform('mean')\n",
"# Affichage des premières lignes des données pour vérification\n",
"print(data.head())"
]
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": 10,
"metadata": {},
"outputs": [
{
......@@ -222,7 +224,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 35,
"metadata": {},
"outputs": [
{
......@@ -239,14 +241,15 @@
}
],
"source": [
"# Obtencion de la oscilacion et créez une nouvelle colonne 'Oscilation'\n",
"# Oscillation périodique. Obtencion de la oscilacion et créez une nouvelle colonne 'Oscilation'\n",
"data['Oscilation'] = data['Concentration']-data['Mean_CO2_Concentration']\n",
"# Affichage des premières lignes des données pour vérification\n",
"print(data.head())"
]
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 12,
"metadata": {},
"outputs": [
{
......@@ -275,7 +278,7 @@
},
{
"cell_type": "code",
"execution_count": 43,
"execution_count": 13,
"metadata": {},
"outputs": [
{
......@@ -315,7 +318,7 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": 15,
"metadata": {},
"outputs": [
{
......@@ -362,7 +365,7 @@
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 16,
"metadata": {},
"outputs": [
{
......@@ -401,12 +404,14 @@
}
],
"source": [
"# Oscillation périodique. Caractériser l’oscillation\n",
"# Affichage des premières lignes des données pour vérification\n",
"print(data.head())"
]
},
{
"cell_type": "code",
"execution_count": 46,
"execution_count": 18,
"metadata": {},
"outputs": [
{
......@@ -437,7 +442,7 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 19,
"metadata": {},
"outputs": [
{
......@@ -449,13 +454,13 @@
}
],
"source": [
"# Comment caractériser l'oscillation en calculant la transformée de Fourier donne des valeurs pas faciles à comprendre a priori, une autre manière est choisie pour caractériser l'oscillation\n",
"# Oscillation périodique. Comment caractériser l'oscillation en calculant la transformée de Fourier donne des valeurs pas faciles à comprendre a priori, une autre manière est choisie pour caractériser l'oscillation\n",
"print(\"Comment caractériser l'oscillation périodique en calculant la transformée de Fourier donne des valeurs pas faciles à comprendre a priori, une autre manière est choisie pour caractériser l'oscillation\")"
]
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": 20,
"metadata": {},
"outputs": [
{
......@@ -484,7 +489,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 21,
"metadata": {},
"outputs": [
{
......@@ -509,7 +514,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 22,
"metadata": {},
"outputs": [
{
......@@ -539,7 +544,7 @@
},
{
"cell_type": "code",
"execution_count": 50,
"execution_count": 23,
"metadata": {},
"outputs": [
{
......@@ -579,7 +584,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
......@@ -592,7 +597,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
......@@ -607,7 +612,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 26,
"metadata": {},
"outputs": [
{
......@@ -637,7 +642,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 27,
"metadata": {},
"outputs": [
{
......@@ -667,7 +672,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
......@@ -689,7 +694,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 29,
"metadata": {},
"outputs": [
{
......@@ -719,7 +724,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 30,
"metadata": {},
"outputs": [
{
......@@ -749,7 +754,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 31,
"metadata": {},
"outputs": [
{
......@@ -778,7 +783,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 32,
"metadata": {},
"outputs": [
{
......@@ -807,7 +812,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 33,
"metadata": {},
"outputs": [
{
......@@ -836,7 +841,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": 34,
"metadata": {},
"outputs": [
{
......@@ -870,27 +875,6 @@
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
......
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