From 8f2fe409ffc2ce73ced8d641ded5c821aaf8a96c 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 eb3206ab1e8..646a8e84aee 100644 --- a/packages/@ourworldindata/grapher/src/core/Grapher.tsx +++ b/packages/@ourworldindata/grapher/src/core/Grapher.tsx @@ -2271,10 +2271,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.