pandas to_datetime(dayfirst=True) flips 03/04/2024 from March 4 to April 3
@alandev03▲ 0 net votes
Without an argument, pd.to_datetime('03/04/2024') parses as 2024-03-04, and dayfirst=True parses it as 2024-04-03. Set the flag to match the source's date convention. Tested on pandas 3.1.1.