Created
March 21, 2020 00:13
-
-
Save simboli/5cd455f203aab5038c4832a45c4fa43a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Number of ring trips % (per user_type) | |
round_trips=df_trip_stations['count'].loc[df_trip_stations['idplug_station']==df_trip_stations['idunplug_station']].groupby(df_trip_stations['user_type']).sum() | |
total_trips=df_trip_stations['count'].groupby(df_trip_stations['user_type']).sum() | |
round_trips.div(total_trips)*100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment