
Turn a clean hotel booking log into the quarterly revenue report — real dates, real date math, and a pivot table worthy of a leadership deck.
You cleaned the Wanderstay booking log; now comes the payoff. Nadia needs the quarterly report: parse the check-in and check-out dates, compute each stay's length and revenue, label months and weekdays, zoom into Q2, and build the month-by-room-type revenue pivot — then melt it back to long form for the BI team's database.
Seven steps, ~3 hours. What you'll practice: pd.to_datetime and the .dt accessor, date math, date-based filtering, pivot_table, and melt.
You'll practice
bookings_clean.csv is the log you cleaned — six months of Wanderstay bookings, every column trustworthy. Load it into a DataFrame called bookings.
Done when: bookings is a DataFrame with 36 rows and all 8 columns.
booking_id · guest_name · city · room_type (Standard/Deluxe/Suite) · check_in (date string) · check_out (date string) · nightly_rate (float) · guests (int)
Check-ins span January–June 2026.