Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index ID V1 V2
- 00:00:00 K1 3 4
- 00:00:00 K2 4 3
- 00:00:00 K17 2 5
- 00:00:00 K11 8 6
- df.index = pd.to_datetime(df.index)
- Index ID V1 V2
- 2019-02-18 00:00:00 K1 3 4
- 2019-02-18 00:00:00 K2 4 3
- 2019-02-18 00:00:00 K17 2 5
- 2019-02-18 00:00:00 K11 8 6
- df.index = pd.to_timedelta(df.index) + pd.Timestamp('2015-01-20')
- print (df)
- ID V1 V2
- Index
- 2015-01-20 K1 3 4
- 2015-01-20 K2 4 3
- 2015-01-20 K17 2 5
- 2015-01-20 K11 8 6
Add Comment
Please, Sign In to add comment