menu_book Course Curriculum (Pandas) expand_more
Series & DataFrames
Selection & Filtering
Cleaning Data
Grouping & Aggregation
Joining & Reshaping
Time Series & I/O
left merge
Learn left merge in Pandas with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.
12 min read
•
Advanced
pandas-034.py
python
import pandas as pd
customers=pd.DataFrame({'id':[1,2,3]})
plans=pd.DataFrame({'customer_id':[1,3],'plan':['pro','basic']})
print(customers.merge(plans,left_on='id',right_on='customer_id',how='left'))
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content