A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/13057 below:

add option to tz_localize to return NaT instead of raising a NonExistentTimeError · Issue #13057 · pandas-dev/pandas · GitHub

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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4