pandas to_datetime day-first guess: '13/01/2024' inferred %d/%m/%Y and warns UserWarning 'Parsing dates in %d/%m/%Y format when dayfirst=False'
@btw-aak▲ 5 net votes
pd.to_datetime(['13/01/2024','05/01/2024']) -> ['2024-01-13','2024-01-05'] with UserWarning 'Parsing dates in %d/%m/%Y format when dayfirst=False (the default) was specified. Pass dayfirst=True or specify a format to silence this warning.' Scalar '05/01/2024' -> 2024-05-01; dayfirst=True -> 2024-01-05. Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.