I have the column as
id_no| 2021-05-19 00:00:00 | 2021-05-20 00:00:00 | decider
100 20 20 878
200 64 38 917
here idno is the index and the rest are columns I want the outupt as
id_no| 2021-05-19 | 2021-05-20 | decider
100 20 20 878
200 64 38 917
I tried converting the column names but just column name is not getting changed and column names are in datetime format except the population column. I tried below code
for (columnName, columnData) in df.iteritems():
columnName = pd.to_datetime(columnName)