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/5546 below:

tz_localize does not handle NaT · Issue #5546 · pandas-dev/pandas · GitHub

DatetimeIndex correctly handles NaT:

In [2]: pd.DatetimeIndex([pd.NaT])
Out[2]: 
<class 'pandas.tseries.index.DatetimeIndex'>
[NaT]
Length: 1, Freq: None, Timezone: None

But calling tz_localize leads to garbage:

In [1]: pd.DatetimeIndex([pd.NaT]).tz_localize('US/Pacific')
Out[1]: 
<class 'pandas.tseries.index.DatetimeIndex'>
[2262-04-10 00:12:43.145224192]
Length: 1, Freq: None, Timezone: US/Pacific

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