From edb498a0925e6ff522342f9e441a4dc2e9cc02e6 Mon Sep 17 00:00:00 2001 From: Yuxuan Mei <yuxuan.mei@icloud.com> Date: Wed, 26 Jun 2024 15:01:14 -0700 Subject: [PATCH] fix pandas tutor link --- data-frames.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-frames.ipynb b/data-frames.ipynb index 64163fe..51cedfc 100644 --- a/data-frames.ipynb +++ b/data-frames.ipynb @@ -415,7 +415,7 @@ "- `df[colname]` returns the corresponding `Series` from the `df`.\n", "- `df[boolean_series]` returns a new `DataFrame` containing just the rows specified `True` in the `boolean_series`.\n", "\n", - "These two access methods are special cases of a more general `df.loc[rows, columns]` function that provides more functionality. For example, we can select just the city populations for cities with at least 200 emissions and visualize the procedure in [PandasTutor](https://pandastutor.com/vis.html#code=import%20pandas%20as%20pd%0Aimport%20io%0A%0Acsv%20%3D%20%22%22%22%0ACity,Country,Emissions,Population%0ANew%20York,USA,200,1500%0AParis,France,48,42%0ABeijing,China,300,2000%0ANice,France,40,60%0ASeattle,USA,100,1000%0A%22%22%22%0A%0Aemissions%20%3D%20pd.read_csv%28io.StringIO%28csv%29,%20index_col%3D%22City%22%29%0Aemissions%5Bemissions%5B%22Emissions%22%5D%20%3E%3D%20200%5D&d=2024-01-17&lang=py&v=v1)." + "These two access methods are special cases of a more general `df.loc[rows, columns]` function that provides more functionality. For example, we can select just the city populations for cities with at least 200 emissions and visualize the procedure in [PandasTutor](https://pandastutor.com/vis.html#code=import%20pandas%20as%20pd%0Aimport%20io%0A%0Acsv%20%3D%20%22%22%22%0ACity,Country,Emissions,Population%0ANew%20York,USA,200,1500%0AParis,France,48,42%0ABeijing,China,300,2000%0ANice,France,40,60%0ASeattle,USA,100,1000%0A%22%22%22%0A%0Aemissions%20%3D%20pd.read_csv%28io.StringIO%28csv%29,%20index_col%3D%22City%22%29%0Ahigh_emissions%20%3D%20emissions%5B%22Emissions%22%5D%20%3E%3D%20200%0Aemissions.loc%5Bhigh_emissions,%20%22Population%22%5D&d=2024-06-26&lang=py&v=v1)." ] }, { -- GitLab