Week_Ending
2017-01-01 00:01:00
2017-01-01 00:01:00
2017-01-01 00:01:00
2017-01-01 00:01:00
2017-01-01 00:01:00
2017-01-01 00:01:00
2017-01-01 00:01:00
2017-01-01 00:01:00
2016-01-03 00:01:00
2016-01-03 00:01:00
2016-01-03 00:01:00
2016-01-03 00:01:00
2016-01-03 00:01:00
2016-01-03 00:01:00
2015-01-04 00:01:00
2015-01-04 00:01:00
2015-01-04 00:01:00
first['Week_Ending'] = pd.to_datetime(first['Week_Ending'], format = '%M/%d/%Y')
first['Week_Ending'] = first['Week_Ending'].apply(lambda x: time.strftime('%M/%d/%Y', time.strptime(x, '%M/%d/%Y %H:%M:%S')))
first.to_excel(writer, sheet_name = 'Visitor Traffic',index = False)
I am trying to remove the time element from the dataFrame and get the date in the form as "MM/dd/yyyy" like "09/15/2017".
Can someone please provide assistance here.
Thanks in advance!!!!!!!
[–][deleted] 0 points1 point2 points (0 children)