Python
All Top 50 Python & Pandas Interview Questions#41
Table Joins with pd.merge() and Indicator Auditing in Pandas
EasyAmazonInterview Question #41
Asked at AmazonGiven `users_df` and `orders_df`, perform a left join on `user_id`. Use `indicator=True` to find users who have never placed an order.
Input Table: users & orders
2 rows preview| user_id | name | order_id |
|---|---|---|
| 1 | Aarav | 901 |
| 2 | Bhavna | NULL |
Expected Output Structure1 rows
| user_id | name | _merge |
|---|---|---|
| 2 | Bhavna | left_only |
Interview Context
Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.
Python 3.10 (Pandas)
Environment Ready
Click "Run & Test" to execute your Pandas code against the test assertions.