datetime in pandas to string astype code example
Example 1: convert column in pandas to datetime
df['col'] = pd.to_datetime(df['col'])
Example 2: data series to datetime
pd.to_datetime(your_series)
df['col'] = pd.to_datetime(df['col'])
pd.to_datetime(your_series)