Skip to content
masterclass Buddy

Pandas · Function

pd.merge

pandas.merge joins two DataFrame or named Series objects using matching columns or indexes. Its default inner join keeps only keys present in both inputs.

Last updated

Syntax

pandas.merge(left, right, how='inner', on=None, left_on=None, right_on=None, left_index=False, right_index=False, sort=False, suffixes=('_x', '_y'), copy=<no_default>, indicator=False, validate=None)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • merge_ordered
  • merge_asof
  • DataFrame.join

Source: pandas.merge — pandas 3.1.0 documentation. Checked 2026-11-03.