update

parent 884a7968
......@@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
......@@ -28,10 +28,8 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\""
......@@ -59,14 +57,27 @@
"La première ligne du fichier CSV est un commentaire, que nous ignorons en précisant `skiprows=1`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"utiliser le fichier télécharger pour être sur que les données sont accesible tout le temps."
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"raw_data = pd.read_csv(data_url, skiprows=1)\n",
"raw_data"
"\n",
"dowloaded_file = \"incidence-PAY-3.csv\"\n",
"\n",
"import os\n",
"import urllib.request\n",
"if not os.path.exists(dowloaded_file):\n",
" urllib.request.urlretrieve(data_url, dowloaded_file)\n",
"raw_data = pd.read_csv(data_url, skiprows=1)"
]
},
{
......@@ -78,9 +89,73 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"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",
" <tr>\n",
" <th>1870</th>\n",
" <td>198919</td>\n",
" <td>3</td>\n",
" <td>-</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>-</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>FR</td>\n",
" <td>France</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" week indicator inc inc_low inc_up inc100 inc100_low inc100_up \\\n",
"1870 198919 3 - NaN NaN - NaN NaN \n",
"\n",
" geo_insee geo_name \n",
"1870 FR France "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"raw_data[raw_data.isnull().any(axis=1)]"
]
......@@ -364,7 +439,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
"version": "3.6.4"
}
},
"nbformat": 4,
......
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