Skip to content

Commit

Permalink
📜 add google colab workaround to python example (#4165)
Browse files Browse the repository at this point in the history
* 📜 add google colab workaround to python example

* 🔨 fix typo
  • Loading branch information
danyx23 authored Nov 14, 2024
1 parent 7398cd8 commit 6d37fbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@ourworldindata/grapher/src/modal/DownloadModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@ const CodeExamplesBlock = (props: { csvUrl: string; metadataUrl: string }) => {
"Python with Pandas": `import pandas as pd
import requests
# Fetch the data
df = pd.read_csv("${props.csvUrl}")
# Fetch the data. The User-Agent header is only necessary on google colab.
df = pd.read_csv("${props.csvUrl}", storage_options = {'User-Agent': 'Our World In Data data fetch/1.0'})
# Fetch the metadata
metadata = requests.get("${props.metadataUrl}").json()`,
Expand Down

0 comments on commit 6d37fbb

Please sign in to comment.