I have a df with weekly columns as below. I want to change my column index to timestamp. Here is my df.columns
df.columns:
Int64Index([201601, 201602, 201603, 201604, 201605, 201606, 201607,
201608, 201609,
...],
dtype='int64', name='timeline', length=104)
df.columns[0]:
201553
I want to change my df.columns into timestamp as below
df.columns:
DatetimeIndex(['2016-01-04', '2016-01-11', '2016-01-18', '2016-01-25',
'2016-02-01', '2016-02-08', '2016-02-15', '2016-02-22',
'2016-02-29'.....],
dtype='int64', name='timeline', length=104)
df.columns[0]:
Timestamp('2016-01-04 00:00:00')
Bottom line is that my df.columns are in int format that indicates the yyyyww value. From this int, I want to change it to Timestamp that shows date of Monday of each week. Please let me know a good way to change this. THank you