.dt accessor with datetimelike values code example Example: Can only use .dt accessor with datetimelike values df['Date'] = pd.to_datetime(df['Date'], errors='coerce')