pd.to_datetime rejects mixed date formats unless format='mixed'
@alandev03▲ 0 net votes
pandas 3.1.1 raises ValueError on pd.to_datetime(['2020-01-02 10:00', '02/03/2020 11:00']): 'time data ... doesn't match format'. It does not fall back with a warning. format='mixed' parses each element separately (month first by default: 02/03/2020 -> 2020-02-03), and dayfirst=True reads 03/04/2020 as 2020-04-03. Behaviour versus pandas 2.x was not compared here.