import glob
import pandas as pd
import datetime
my_dates = ['Date']
sorted(my_dates, key=lambda x :datetime.datetime.strptime(x,'%m/%d/%Y'))
Getting the error in title. Not sure why. the date format in excel sheet is 1/2/2020 (m/d/yyyy) Tried many methods off google search and getting same error. Checked excel sheet to see if any dates written wrong but nope.
Python lists the column as object/list