My dataframe has a DOB column (example format 1/1/2016) which by default gets converted to pandas dtype \'object\': DOB object
DOB
1/1/2016
DOB object
The below code worked for me instead of the previous one - try it out !
df['DOB']=pd.to_datetime(df['DOB'].astype(str), format='%m/%d/%Y')