Skip to content

Commit 0656bde

Browse files
committed
nobel dataset can't be pandas-downloaded any longer, so update instructions
1 parent 0d6c0f9 commit 0656bde

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

content/pandas.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,18 @@ Time series superpowers
333333

334334
An introduction of pandas wouldn't be complete without mention of its
335335
special abilities to handle time series. To show just a few examples,
336-
we will use a new dataset of Nobel prize laureates::
336+
we will use a new dataset of Nobel prize laureates available through
337+
an API of the Nobel prize organisation at
338+
http://api.nobelprize.org/v1/laureate.csv .
337339

338-
nobel = pd.read_csv("http://api.nobelprize.org/v1/laureate.csv")
340+
Unfortunately this API does not allow "non-browser requests", so
341+
:meth:`pd.read_csv` will not work. We can either open the above link in
342+
a browser and download the file, or use the JupyterLab interface by clicking
343+
"File" and "Open from URL", and then save the CSV file to disk.
344+
345+
We can then load and explore the data::
346+
347+
nobel = pd.read_csv("laureate.csv")
339348
nobel.head()
340349

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

0 commit comments

Comments
 (0)