I am trying to convert a column "col1" to datetime format in a dataframe. "col1" has date values as strings with date format like "2021-10-01 00:00:00". The code I am using is:
data['Output']=pd.to_datetime(data['col1'],format='%Y-%m-%d %H:%M:%S')
But while doing so, the date values in "Output" column are coming like this "2021-10-01T00:00:00.000000000". I don't know what is this T value in the date, and I don't want to have it in my data. I only want date and timestamp. How can I resolve this issue?