Last active
November 10, 2017 18:12
-
-
Save MattMcMurray/aa14170cf1be77ffb4633b6c9dbe0196 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time_deltas = appt_data['AppointmentDay'] - appt_data['ScheduledDay'] | |
appt_data['WaitingTime'] = time_deltas.copy() | |
appt_data['WaitingTime'] = appt_data['WaitingTime'].dt.days | |
# Interestingly, about 1/3 of appointments were booked AFTER they happened... | |
appt_data['WaitingTime'].where( | |
appt_data['WaitingTime'] < pd.Timedelta(0)).count() / appt_data['WaitingTime'].count() | |
# 0.34894641128412063 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment