Last active
July 26, 2021 10:17
-
-
Save git-shogg/d7c6160aaa4d8caa5628143a6b6f8be5 to your computer and use it in GitHub Desktop.
Google_Timeline_Summary-Step_06.py
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
############################################################################### | |
# 6. Remove Weekday Exceptions and Aggregate the Results # | |
############################################################################### | |
# Remove Weekday Exceptions | |
if weekday_exceptions != None: | |
df = df[~df.weekday.isin(weekday_exceptions)] | |
# Aggregate the Results | |
df = df.groupby(aggregate_list).agg({'timestamp':['count'],'distance':['mean']}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment