From 94db4fd132f65f148670814613b7834c90c5d226 Mon Sep 17 00:00:00 2001 From: Daniel Bachler Date: Tue, 28 May 2024 14:19:18 +0200 Subject: [PATCH] :bug: fix notebook code --- packages/@ourworldindata/grapher/src/core/Grapher.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@ourworldindata/grapher/src/core/Grapher.tsx b/packages/@ourworldindata/grapher/src/core/Grapher.tsx index d77fbec04fa..54ca5d1239b 100644 --- a/packages/@ourworldindata/grapher/src/core/Grapher.tsx +++ b/packages/@ourworldindata/grapher/src/core/Grapher.tsx @@ -2281,10 +2281,10 @@ The code in the cell below provides the infrastructure to access our data. It is # run_on_load: true # ---%% from pyodide.http import open_url -from io import StringIO -csv = open_url("${this.baseUrl}.csv").getValue() +import pandas as pd +csv = open_url("${this.baseUrl}.csv") -df = pd.read_csv(StringIO(csv)) +df = pd.read_csv(csv) # %% [markdown] Add your code below - the example shows the first few rows of the data. Refer to the pandas documentation of ask ChatGPT for help on how to manipulate pandas dataframes.