pandas col to datetime code example
Example 1: convert column in pandas to datetime
df['col'] = pd.to_datetime(df['col'])
Example 2: hwo to separate datetime column into date and time pandas
import pandas as pd
df = pd.read_csv(file_path)
df['Dates'] = pd.to_datetime(df['date']).dt.date
df['Time'] = pd.to_datetime(df['date']).dt.time