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

datetime operations on NaT produce dangerous results · Issue #8689 · pandas-dev/pandas · GitHub

Skip to content Navigation Menu Search code, repositories, users, issues, pull requests...

Saved searches Use saved searches to filter your results more quickly

Sign up 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

datetime operations on NaT produce dangerous results  #8689

Labels

BugDatetimeDatetime data dtypeDatetime data dtypeMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Description
In [189]: ser = pd.Series([np.datetime64('nat')])

In [190]: ser
Out[190]: 
0   NaT
dtype: datetime64[ns]

In [191]: ser.dt.hour
Out[191]: 
0   -1
dtype: int64

While -1 is not a valid hour it is a very valid integer and could (has) caused hard to track bugs.

Metadata Metadata

Assignees

No one assigned BugDatetimeDatetime data dtypeDatetime data dtypeMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Development

No branches or pull requests Issue actions

You can’t perform that action at this time.


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