Change8
Error1 reports

Fix AmbiguousTimeError

in Pandas

Solution

The "AmbiguousTimeError" in pandas arises when a datetime falls within a daylight saving time (DST) transition, resulting in multiple possible interpretations. Fix this by using the `ambiguous` parameter in `tz_localize()` or `Timestamp()` to specify how to handle such datetimes, for example, set `ambiguous='infer'` or provide a boolean array indicating whether each ambiguous time should be treated as DST or non-DST.

Related Issues

Real GitHub issues where developers encountered this error:

Timeline

First reported:Oct 31, 2025
Last reported:Oct 31, 2025

Need More Help?

View the full changelog and migration guides for Pandas

View Pandas Changelog