convert the dataframe column 'col' from string types to datetime types,df['col'] = pd.to_datetime(df['col'])