Created
May 30, 2017 11:46
-
-
Save hardiksondagar/0e75f47f02c6b9e5a5c8399245a4201e to your computer and use it in GitHub Desktop.
Pandas change Datetime to epoch
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
df['<epoch_column>'] = df['<datetime_column>'].dt.tz_localize('<timezone_string>').astype(np.int64) // 1e9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment