
Clean a hotel group's messy booking export until every column can be trusted.
You just joined Wanderstay, a boutique hotel group with four properties. The front-desk system exported the booking log twice and nobody noticed — has duplicated rows, headers with stray spaces and odd casing, three bookings with no city, room types typed every way imaginable, and nightly rates stored as text like "$1,250.00". Nadia, the revenue ops manager, needs a table she can trust before the quarterly report.
Six steps, ~2 hours. What you'll practice: tidying headers, filling missing values, dropping duplicates, vectorised string cleanup, and type conversion.
You'll practice
bookings_raw.csv is sitting in your workspace, exactly as the front-desk system spat it out. Load it into a pandas DataFrame called bookings_raw, then take a look at the column names — you'll see why Nadia won't work with this file.
Done when: bookings_raw is a DataFrame with 24 rows and all 8 (messy) columns.
booking_id · guest_name · city (3 missing) · room_type (inconsistent text) · check_in · check_out · nightly_rate (text, e.g. "$1,250.00") · guests (int)
Headers arrive with stray spaces and casing — e.g. " Booking ID", "City ".