Skip to content

Commit

Permalink
differences for PR #552
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 15, 2023
1 parent 05048ea commit e0a6256
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions 03-index-slice-subset.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Empty file modified fig/00_0_jupyter_notebook_example.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e0a6256

Please sign in to comment.