Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- def time_stamp(df,time_col):
- df[time_col] = pd.to_datetime(df[time_col])
- df["year"] = df[time_col].dt.year
- df["month"] = df[time_col].dt.month
- df["day"] = df[time_col].dt.day
- df['day_of_yr']=df[time_col].dt.strftime('%j').astype(int)
- time_stamp(df,"Latest Launch")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement