You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if the tz_localize function of a DatetimeIndex had an optional flag for silently returning NaT instead of throwing a NonExistentTimeError, if the timestamp is not valid in the given timezone (for example due to DST changes).
I ran into this problem while trying to tz_localize a large index, and it seems to me that this would be a much better solution than manually handling the exception with a lambda expression in a (slow) python loop.