diff --git a/data-frames.ipynb b/data-frames.ipynb index 64163fe2727038c83e7e0d13af4ea1f635132a1e..51cedfc09624b6888c5b1fb0500b5fe1921f2990 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)." ] }, {