EEMI

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