Created
August 29, 2019 10:33
-
-
Save mvervuurt/ef567d67cd9a1dd0904aefe9a6cab38b to your computer and use it in GitHub Desktop.
Pandas datetime
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
import pandas as pd | |
#really neat trick to create a Pandas datetime from several columns | |
df['date']=pd.to_datetime(dict(year=df['year'], month=df['month'], day=1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment