Generate Friendship List with Acceptance Dates Using Pandas
Company: Roblox
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: Medium
Interview Round: Onsite
friend_events
| requester_id | accepter_id | request_date | accept_date |
|--------------|-------------|--------------|-------------|
| 1 | 2 | 2024-01-01 | 2024-01-02 |
| 2 | 3 | 2024-01-03 | 2024-01-05 |
| 3 | 2 | 2024-01-04 | 2024-01-05 |
| 2 | 1 | 2024-01-06 | 2024-01-07 |
| 4 | 1 | 2024-01-08 | 2024-01-09 |
##### Scenario
After launching a social feature, product wants a list of confirmed friendships with the date they formed.
##### Question
Given friend request logs, write Python/pandas that returns each distinct user pair once (smaller id first) and the acceptance date when the friendship became active.
##### Hints
Filter accepted rows, sort ids, drop_duplicates.
Quick Answer: This question evaluates proficiency in data manipulation and relational reasoning using Python/pandas, focusing on transforming event logs into canonical pairwise relationships and extracting activation timestamps.