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
e58a19bb30ee0a47a654095e1d322ed5
mooc-rr
Commits
c334953b
Commit
c334953b
authored
Aug 31, 2023
by
Valentin Durante
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first commit exo2
parent
4a34f745
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1857 additions
and
3 deletions
+1857
-3
exercice_fr.ipynb
module3/exo2/exercice_fr.ipynb
+147
-3
incidence-PAY-7.csv
module3/exo2/incidence-PAY-7.csv
+1710
-0
No files found.
module3/exo2/exercice_fr.ipynb
View file @
c334953b
{
"cells": [],
"cells": [
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"import isoweek"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Lecture du jeu de données\n",
"La première ligne du fichier csv est retirée car il s'agit d'un commentaire"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"raw_data = pd.read_csv(\"incidence-PAY-7.csv\", skiprows=1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Rapide examen visuel des data"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" week indicator inc inc_low inc_up inc100 inc100_low \\\n",
"0 202334 7 1665 0 3429 3 0 \n",
"1 202333 7 3345 1201 5489 5 2 \n",
"2 202332 7 8009 1132 14886 12 2 \n",
"3 202331 7 3318 1398 5238 5 2 \n",
"4 202330 7 5821 3269 8373 9 5 \n",
"... ... ... ... ... ... ... ... \n",
"1703 199101 7 15565 10271 20859 27 18 \n",
"1704 199052 7 19375 13295 25455 34 23 \n",
"1705 199051 7 19080 13807 24353 34 25 \n",
"1706 199050 7 11079 6660 15498 20 12 \n",
"1707 199049 7 1143 0 2610 2 0 \n",
"\n",
" inc100_up geo_insee geo_name \n",
"0 6 FR France \n",
"1 8 FR France \n",
"2 22 FR France \n",
"3 8 FR France \n",
"4 13 FR France \n",
"... ... ... ... \n",
"1703 36 FR France \n",
"1704 45 FR France \n",
"1705 43 FR France \n",
"1706 28 FR France \n",
"1707 5 FR France \n",
"\n",
"[1708 rows x 10 columns]\n"
]
}
],
"source": [
"print(raw_data)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>week</th>\n",
" <th>indicator</th>\n",
" <th>inc</th>\n",
" <th>inc_low</th>\n",
" <th>inc_up</th>\n",
" <th>inc100</th>\n",
" <th>inc100_low</th>\n",
" <th>inc100_up</th>\n",
" <th>geo_insee</th>\n",
" <th>geo_name</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: [week, indicator, inc, inc_low, inc_up, inc100, inc100_low, inc100_up, geo_insee, geo_name]\n",
"Index: []"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"raw_data[raw_data.isnull().any(axis=1)]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
...
...
@@ -16,10 +161,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.
6.3
"
"version": "3.
7.5
"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
module3/exo2/incidence-PAY-7.csv
0 → 100644
View file @
c334953b
This diff is collapsed.
Click to expand it.
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