diff --git a/03-index-slice-subset.md b/03-index-slice-subset.md index 52a85a14e..c9576e6e7 100644 --- a/03-index-slice-subset.md +++ b/03-index-slice-subset.md @@ -283,9 +283,13 @@ surveys_df = pd.read_csv("data/surveys.csv") We can select specific ranges of our data in both the row and column directions using either label or integer-based indexing. -- `loc` is primarily *label* based indexing. *Integers* may be used but - they are interpreted as a *label*. -- `iloc` is primarily *integer* based indexing +- `iloc` is primarily an *integer* based indexing counting from 0. That is, your + specify rows and columns giving a number. Thus, the first row is row 0, + the second column is column 1, etc. + +- `loc` is primarily a *label* based indexing where you can refer to rows and + columns by their name. E.g., column 'month'. Note that *integers* may be + used, but they are interpreted as a *label*. To select a subset of rows **and** columns from our DataFrame, we can use the `iloc` method. For example, we can select month, day and year (columns 2, 3 diff --git a/fig/00_0_jupyter_notebook_example.jpg b/fig/00_0_jupyter_notebook_example.jpg old mode 100755 new mode 100644 diff --git a/md5sum.txt b/md5sum.txt index e2c1d066e..76504c2fe 100644 --- a/md5sum.txt +++ b/md5sum.txt @@ -7,7 +7,7 @@ "episodes/00-before-we-start.md" "0fbbeb717a3a6b613ff472b21bba4e21" "site/built/00-before-we-start.md" "2023-05-08" "episodes/01-short-introduction-to-Python.md" "8cdcf74a840b265b88ab60724ad17408" "site/built/01-short-introduction-to-Python.md" "2023-05-08" "episodes/02-starting-with-data.md" "4cac8c55b79e5e0f00a98880da127748" "site/built/02-starting-with-data.md" "2023-05-08" -"episodes/03-index-slice-subset.md" "4005ea5fbee932f02a74e1e6db1120dd" "site/built/03-index-slice-subset.md" "2023-05-08" +"episodes/03-index-slice-subset.md" "e0492e2a4d0e1a4a3a7bff0268f9b252" "site/built/03-index-slice-subset.md" "2023-05-15" "episodes/04-data-types-and-format.md" "04fae7c4573d1524b12f0977973151b9" "site/built/04-data-types-and-format.md" "2023-05-08" "episodes/05-merging-data.md" "3f14de8cbf7239389ba6110ff02523aa" "site/built/05-merging-data.md" "2023-05-08" "episodes/06-loops-and-functions.md" "812bd4379a6eca318cfee1ec976f946b" "site/built/06-loops-and-functions.md" "2023-05-08"