Member-only story
I. What Happens When Tables Are Combined:
When combining tables or multiple tables of data using pandas in Python, you typically use functions like merge()
or concat()
to achieve different types of joins or concatenations. Here are various scenarios that might happen during the process:
1. Inner Join:
- Common values: Rows from both tables where the specified columns have matching values are retained.
- Uncommon values: Rows with non-matching values are excluded.
2. Outer Join:
- Common values: Rows with matching values in the specified columns are retained.
- Uncommon values: Rows with non-matching values from both tables are included, with NaN or null values filling the gaps.
3. Left Join (Left Outer Join):
- Common values: Rows with matching values in the specified columns are retained.
- Uncommon values: All rows from the left (first) table are included, and null values are filled in for non-matching values from the right (second) table.