Commit 7ab79d47 authored by Corentin Ambroise's avatar Corentin Ambroise

exo1

parents
Here we dowload the data locally, but test first if the data does not
exist. Then we read it and display the first few rows.
#+begin_src python :results output :session :exports both
import wget
import os
import pandas as pd
url = 'http://www.sentiweb.fr/datasets/incidence-PAY-3.csv'
path = './dataset_grippal.csv'
if not os.path.exists(path):
wget.download(url, path)
data = pd.read_csv(path, skiprows=1)
print(data.head())
#+end_src
#+RESULTS:
: week indicator inc inc_low ... inc100_low inc100_up geo_insee geo_name
: 0 202108 3 27492 22140.0 ... 34.0 50.0 FR France
: 1 202107 3 22191 18096.0 ... 28.0 40.0 FR France
: 2 202106 3 23171 19122.0 ... 29.0 41.0 FR France
: 3 202105 3 22426 18445.0 ... 28.0 40.0 FR France
: 4 202104 3 25804 21491.0 ... 32.0 46.0 FR France
:
: [5 rows x 10 columns]
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