Skip to content

Instantly share code, notes, and snippets.

@hamletbatista
Last active September 28, 2019 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hamletbatista/bbd13f34dc7a87f617c3f90a77958989 to your computer and use it in GitHub Desktop.
Save hamletbatista/bbd13f34dc7a87f617c3f90a77958989 to your computer and use it in GitHub Desktop.
average_wait=pd.Series(df.mean(), name="Average Wait Time")
print(average_wait)
#example output
#Astro Orbitor 12.453125
#Buzz Lightyear Astro Blasters 17.953125
duration = pd.Series(ride_durations, name="Ride Duration")
print(duration)
#example output
#Millennium Falcon FASTPASS Kiosk 0.00
#Buzz Lightyear Astro Blasters FASTPASS Kiosk 1.00
pd.concat([average_wait, duration], axis=1)
#example output
# Average Wait Time Ride Duration
# "it's a small world" Holiday Lighting NaN 5.00
# A Christmas Fantasy Parade NaN 27.00
# Alice in Wonderland NaN 4.00
# Astro Orbitor 12.453125 1.50
#We need to remove rows with null values
ride_by_wait_time_duration = pd.concat([average_wait, duration], axis=1).dropna()
print(ride_by_wait_time_duration)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment