Guided Notes

Merging & Joining

Combining DataFrames with concat, merge on keys, join types, and checking results.

Two ways to combine tables

Slide 1 / 5

β€’ pd.concat stacks DataFrames β€” adding rows (like appending January's and February's sales) or, with axis=1, placing them side by side. β€’ pd.merge joins DataFrames on matching key columns β€” like SQL's JOIN, bringing customer names into an orders table.

Use concat when the tables have the same columns; use merge when they share a key but hold different information.

← GroupBy