Transform DataFrame and compute diff-in-diff | Uber Interview Question