Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
521adc37f04e8509ebf5ce131815aa0a
mooc-rr
Commits
7497960f
Commit
7497960f
authored
Feb 10, 2021
by
521adc37f04e8509ebf5ce131815aa0a
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout des commentaires manquants avant les codes
parent
d242b19d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
exercice.ipynb
module3/exo3/exercice.ipynb
+19
-20
No files found.
module3/exo3/exercice.ipynb
View file @
7497960f
...
@@ -1067,6 +1067,7 @@
...
@@ -1067,6 +1067,7 @@
}
}
],
],
"source": [
"source": [
"# create a barplot\n",
"plt.bar(my_data[\"Year\"], my_data[\"Wheat\"])"
"plt.bar(my_data[\"Year\"], my_data[\"Wheat\"])"
]
]
},
},
...
@@ -1079,16 +1080,16 @@
...
@@ -1079,16 +1080,16 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
7
,
"execution_count":
39
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
"data": {
"data": {
"text/plain": [
"text/plain": [
"<matplotlib.collections.PolyCollection at 0x7f7af
6d8aeb
8>"
"<matplotlib.collections.PolyCollection at 0x7f7af
173d89
8>"
]
]
},
},
"execution_count":
7
,
"execution_count":
39
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
},
},
...
@@ -1106,13 +1107,13 @@
...
@@ -1106,13 +1107,13 @@
}
}
],
],
"source": [
"source": [
"# create a plot\n",
"plt.plot(my_data[\"Year\"], my_data[\"Wages\"], \"r\")\n",
"plt.plot(my_data[\"Year\"], my_data[\"Wages\"], \"r\")\n",
"\n",
"\n",
" \n",
"# fill area between curve and axis\n",
"y1 = my_data[\"Wages\"]\n",
"x = my_data[\"Year\"] \n",
"x = my_data[\"Year\"]\n",
"y = my_data[\"Wages\"] \n",
" \n",
"plt.fill_between(x, y, color='#539ecd')"
"plt.fill_between(x, y1, color='#539ecd')"
]
]
},
},
{
{
...
@@ -1124,16 +1125,16 @@
...
@@ -1124,16 +1125,16 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
8
,
"execution_count":
43
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
"data": {
"data": {
"text/plain": [
"text/plain": [
"<matplotlib.collections.PolyCollection at 0x7f7af
6c8e198
>"
"<matplotlib.collections.PolyCollection at 0x7f7af
1e835c0
>"
]
]
},
},
"execution_count":
8
,
"execution_count":
43
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
},
},
...
@@ -1151,17 +1152,14 @@
...
@@ -1151,17 +1152,14 @@
}
}
],
],
"source": [
"source": [
"# create two plots in the same graph\n",
"p = plt.bar(my_data[\"Year\"], my_data[\"Wheat\"]), \n",
"plt.plot(my_data[\"Year\"], my_data[\"Wages\"], \"r\")\n",
"\n",
"\n",
"\n",
"# fill area between curve and axis\n",
"p = plt.bar(my_data[\"Year\"], my_data[\"Wheat\"]), plt.plot(my_data[\"Year\"], my_data[\"Wages\"], \"r\")\n",
"\n",
"\n",
"x = my_data[\"Year\"]\n",
"x = my_data[\"Year\"]\n",
"y2 = my_data[\"Wages\"]\n",
"y = my_data[\"Wages\"]\n",
"\n",
"plt.fill_between(x, y, color='#539ecd')"
"\n",
"plt.fill_between(x, y2, color='#539ecd')\n",
"\n"
]
]
},
},
{
{
...
@@ -1725,6 +1723,7 @@
...
@@ -1725,6 +1723,7 @@
}
}
],
],
"source": [
"source": [
"# Calculate the purchase_power \n",
"# purchase_power = wages / wheat\n",
"# purchase_power = wages / wheat\n",
"my_data[\"Purchase_Power\"] = my_data[\"Wages\"] / my_data[\"Wheat\"]\n",
"my_data[\"Purchase_Power\"] = my_data[\"Wages\"] / my_data[\"Wheat\"]\n",
"\n",
"\n",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment