Skip to content

Commit 525e60e

Browse files
committed
markdown source builds
Auto-generated via {sandpaper} Source : 64fb4bf Branch : main Author : David Palmquist <[email protected]> Time : 2024-02-05 16:28:33 +0000 Message : Merge pull request #584 from datacarpentry/improveExpandJoinsDiscussion Update join types in pandas merge function
1 parent 10b824c commit 525e60e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

05-merging-data.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -434,16 +434,20 @@ case, `PF`) does not occur in `species_sub`.
434434

435435
### Other join types
436436

437-
The pandas `merge` function supports two other join types:
437+
The pandas `merge` function supports other join types:
438438

439439
- Right (outer) join: Invoked by passing `how='right'` as an argument. Similar
440440
to a left join, except *all* rows from the `right` DataFrame are kept, while
441441
rows from the `left` DataFrame without matching join key(s) values are
442442
discarded.
443443
- Full (outer) join: Invoked by passing `how='outer'` as an argument. This join
444-
type returns the all pairwise combinations of rows from both DataFrames; i.e.,
445-
the result DataFrame will `NaN` where data is missing in one of the dataframes. This join type is
446-
very rarely used.
444+
type returns the all pairwise combinations of rows from both DataFrames; i.e., the
445+
*Cartesian product* and the result DataFrame will use `NaN` where data is missing in one
446+
of the dataframes. This join type is very rarely used, but can be helpful to see all
447+
the qualities of both tables, including each common and duplicate column.
448+
- Self-join: Joins a data frame with itself. Self-joins can be useful when you want to, for
449+
instance, compare records within the same dataset based on a given criteria. A fuller discussion
450+
of how and when it might be useful to do so can be found in [Self-Join and Cross Join in Pandas DataFrame](https://blog.devgenius.io/self-join-and-cross-join-in-pandas-dataframe-b30bfbc0e52a)
447451

448452
## Final Challenges
449453

md5sum.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"episodes/02-starting-with-data.md" "bcd4e9564bd01585a52754fe4ad46f45" "site/built/02-starting-with-data.md" "2023-05-29"
1010
"episodes/03-index-slice-subset.md" "84263a14ba3f492bf6aa17435a78d905" "site/built/03-index-slice-subset.md" "2023-08-18"
1111
"episodes/04-data-types-and-format.md" "e57b9b771e5d2dcf4c9e2521822f8d5a" "site/built/04-data-types-and-format.md" "2023-06-05"
12-
"episodes/05-merging-data.md" "d7c67295a4bc6ba9b4237cff0f8fd322" "site/built/05-merging-data.md" "2023-05-19"
12+
"episodes/05-merging-data.md" "5e0cb1f86b8cb29a87d57b8eaee9acf5" "site/built/05-merging-data.md" "2024-02-05"
1313
"episodes/06-loops-and-functions.md" "d41f11e6c162c86393cd9bd4431c0687" "site/built/06-loops-and-functions.md" "2023-05-18"
1414
"episodes/07-visualization-ggplot-python.md" "814b6fc361595a0c9ea7db393b1424db" "site/built/07-visualization-ggplot-python.md" "2023-05-19"
1515
"episodes/08-putting-it-all-together.md" "b279a4ab47789abda7f71609a78022ed" "site/built/08-putting-it-all-together.md" "2024-01-31"

0 commit comments

Comments
 (0)