TGViewer
Data science/ML/AI Data science/ML/AI @datascience_bds · 14.1K subscribers
Post #1067 1.69K
Merging and Joining Data

Working with multiple datasets? Combine them just like SQL:

# Inner join (default)
merged = pd.merge(df_sales, df_customers, on='customer_id')

# Left join
pd.merge(df_sales, df_customers, on='customer_id', how='left')

# Concatenate vertically
all_data = pd.concat([df_2023, df_2024], ignore_index=True)

# Join on index
df1.join(df2, on='date')


This wraps up our Data Manipulation Using Pandas Series.

Hit ❤️ if you liked this series. It will help us tailor more content based on what you like.

👉Join @datascience_bds for more
Part of the @bigdataspecialist family
  • ❤ 7
More from @datascience_bds
  1. Oct 13, 20261,000 AI/ML Acronyms & Operational Concepts
  2. Oct 12, 2026Roadmap to Learn SQL
  3. Oct 11, 2026🧮 Why does NumPy let you add a number to an entire matrix? Look at this: import numpy as…
  4. Oct 10, 2026document post
  5. Oct 9, 20268 RAG architectures for AI Engineers, visually explained:
  6. Oct 8, 2026document post
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →