Skip to content

API/BUG: return np.nan rather than -1 for invalid datetime accessors values (GH8689) #8695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2014

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Oct 31, 2014

BUG: millisecond Timestamp/DatetimeIndex accessor fixed

closes #8689

@jreback jreback added Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Datetime Datetime data dtype labels Oct 31, 2014
@jreback jreback added this to the 0.15.1 milestone Oct 31, 2014
@jreback
Copy link
Contributor Author

jreback commented Oct 31, 2014

@jorisvandenbossche note that this is a slight API change, but fixes a long-standing oddity (the .milliseconds).

@jreback
Copy link
Contributor Author

jreback commented Oct 31, 2014

@jorisvandenbossche I removed the millisecond stuff...still save for later

jreback added a commit that referenced this pull request Oct 31, 2014
API/BUG: return np.nan rather than -1 for invalid datetime accessors values (GH8689)
@jreback jreback merged commit fb124fd into pandas-dev:master Oct 31, 2014
@jorisvandenbossche
Copy link
Member

yep, good to split it. The -1/nan thing can certainly be regarded as a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

datetime operations on NaT produce dangerous results
2 participants