Skip to content
ML Academy

SQL and Python

Interview question

  • midlevel
  • 8 minsuggested time
  • 3Data scientist, Data analyst, ML engineer

In pandas you merge a bookings DataFrame (one row per booking) with a customer DataFrame on customer_id. The result has more rows than bookings, and some bookings have no customer attributes. List the pandas-specific pitfalls you would check and how you would make the merge safe.

Tests: Practical pandas merge hygiene: cardinality validation, missing and null keys, dtype mismatches, indicator columns, and suffix collisions.

Sign in to practise: answers are saved before model answers are shown.