Skip to content

Instantly share code, notes, and snippets.

@justinr922
Last active November 8, 2019 21:20
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 justinr922/31de91884dc98336f4fc8e48d3258281 to your computer and use it in GitHub Desktop.
Save justinr922/31de91884dc98336f4fc8e48d3258281 to your computer and use it in GitHub Desktop.
Converts the time data in Facebook location data tutorial
# We can apply Pandas.to_datetime() on the creation_timestamp
# column. The unit is 's' for "seconds since the epoch since that is
# the current time format.
location_df['timestamp'] = pd.to_datetime(location_data['creation_timestamp'], unit='s')
#And drop the old column
location_df.drop('creation_timestamp', axis=1, inplace=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment