Skip to content

Commit 6dc453d

Browse files
committed
content/pandas: Adjust lesson to use local copy of laureates.csv
- csv already added in previous commit (so that this can be tested)
1 parent e1bd3d8 commit 6dc453d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/pandas.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,15 +381,15 @@ an API of the Nobel prize organisation at
381381
https://api.nobelprize.org/v1/laureate.csv .
382382

383383
Unfortunately this API does not allow "non-browser requests", so
384-
:obj:`pandas.read_csv` will not work. We can either open the above link in
385-
a browser and download the file, or use the JupyterLab interface by clicking
386-
"File" and "Open from URL", and then save the CSV file to disk.
384+
:obj:`pandas.read_csv` will not work directly on it. Instead, we put a
385+
local copy on Github which we can access (the original data is CC-0,
386+
so we are allowed to do this). (Aside: if you do JupyterLab →
387+
File → Open from URL → paste the URL above, it will open it in
388+
JupyterLab *and* download a copy for your use.)
387389

388390
We can then load and explore the data::
389391

390-
# File → Open from URL → enter https://api.nobelprize.org/v1/laureate.csv
391-
# This opens it in JupyterLab but also saves it as laureate.csv
392-
nobel = pd.read_csv("laureate.csv")
392+
nobel = pd.read_csv("https://github.com/AaltoSciComp/python-for-scicomp/raw/master/resources/data/laureate.csv")
393393
nobel.head()
394394

395395
This dataset has three columns for time, "born"/"died" and "year".

0 commit comments

Comments
 (0)