Last active
November 26, 2018 15:27
-
-
Save gonzalezgouveia/6ef8464b8d161dbec41aff9e20526ee1 to your computer and use it in GitHub Desktop.
ecobici data aggregation
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
# resample y agregacion por dia de mes | |
viajes_resample_day = viajes.Bici.resample('H').count() | |
# asignar día de la semana | |
df_resample = pd.concat([viajes_resample_day], axis=1) | |
df_resample['dayofweek'] = df_resample.index.dayofweek # 0 es lunes | |
# lunes a viernes | |
df_mon_to_fri = df_resample[df_resample.dayofweek.isin([0,1,2,3,4])].Bici |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment