Skip to content

Instantly share code, notes, and snippets.

@git-shogg
Last active July 26, 2021 10:17
Show Gist options
  • Save git-shogg/d7c6160aaa4d8caa5628143a6b6f8be5 to your computer and use it in GitHub Desktop.
Save git-shogg/d7c6160aaa4d8caa5628143a6b6f8be5 to your computer and use it in GitHub Desktop.
Google_Timeline_Summary-Step_06.py
###############################################################################
# 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