You need to sign in or sign up before continuing.
Commit c334953b authored by Valentin Durante's avatar Valentin Durante

first commit exo2

parent 4a34f745
{ {
"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": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 3",
...@@ -16,10 +161,9 @@ ...@@ -16,10 +161,9 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.3" "version": "3.7.5"
} }
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 2 "nbformat_minor": 2
} }
This diff is collapsed.
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