Given two DataFrames of users and orders, return all user-order pairs that share a matching user_id, sorted by user_id then order_id.
users
| column | type |
|---|---|
| user_id | int |
| name | str |
orders
| column | type |
|---|---|
| user_id | int |
| order_id | int |
| amount | float |
users
| user_id | name |
|---|---|
| 1 | Alice |
| 2 | Bob |
| 3 | Carol |
orders
| user_id | order_id | amount |
|---|---|---|
| 1 | 101 | 50.0 |
| 1 | 102 | 80.0 |
| 2 | 103 | 30.0 |
| user_id | name | order_id | amount |
|---|---|---|---|
| 1 | Alice | 101 | 50.0 |
| 1 | Alice | 102 | 80.0 |
| 2 | Bob | 103 | 30.0 |
Only users with at least one matching order are included; user 3 (Carol) has no orders so she is excluded.
users shape = (2, 2), orders shape = (2, 3), all users have one order