Data often resides in multiple files or structures. For effective analysis, you'll frequently need to combine these separate datasets. For instance, you might have user information in one table and their activity logs in another, requiring you to link them for a complete view.
This chapter focuses on the techniques Pandas provides for combining DataFrame
objects. We will cover two main approaches:
pd.concat
.pd.merge
and the .join
method.You will learn how different types of joins (inner, outer, left, right) affect the resulting combined DataFrame
and how to apply these operations effectively based on your data's structure and analytical goals.
10.1 Introduction to Combining Data
10.2 Concatenating DataFrames (pd.concat)
10.3 Database-Style Merging (pd.merge)
10.4 Understanding Merge Types (Joins)
10.5 Merging on Index
10.6 Index-Based Joining (.join)
10.7 Hands-on practical: Combining Datasets
© 2025 ApX Machine Learning