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
ETUDIANT
mooc-rr
Commits
59fd2d27
Commit
59fd2d27
authored
Mar 23, 2020
by
ETUDIANT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update exercice_python_en.org
parent
6ea7063f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
exercice_python_en.org
module3/exo3/exercice_python_en.org
+9
-0
No files found.
module3/exo3/exercice_python_en.org
View file @
59fd2d27
...
@@ -20,6 +20,15 @@ py.init_notebook_mode(connected=True)
...
@@ -20,6 +20,15 @@ py.init_notebook_mode(connected=True)
co2data = pd.read_csv("module3/exo3/monthly_in_situ_co2_mlo.csv")
co2data = pd.read_csv("module3/exo3/monthly_in_situ_co2_mlo.csv")
co2data.head(11)
co2data.head(11)
grp1 = co2data.groupby(["Year"]).mean()["Carbon Dioxide (ppm)"]
trace1 = go.Bar(x=grp1.index, y=grp1.values)
layout = go.Layout(
title="Average CO<sub>2</sub> Levels in Atmosphere per month",
yaxis=dict(title="Parts per million (PPM)", range=(300,420)),
xaxis=dict(title="Year"))
figure = go.Figure(data=[trace1], layout=layout)
py.iplot(figure, filename="co2-ppm-year")
Finally, an example for graphical output:
Finally, an example for graphical output:
#+begin_src python :results output file :session :var matplot_lib_filename="./cosxsx.png" :exports results
#+begin_src python :results output file :session :var matplot_lib_filename="./cosxsx.png" :exports results
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt
...
...
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