Skip to content
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

Add dt accessor to Index #17204

Closed

Conversation

jbrockmendel
Copy link
Member

Following discussion in #17134, this adds a dt property/accessor to pd.Index. This property should quack like pd.Series.dt. If index is not datetime-like, index.dt will raise an AttributeError. Otherwise it will return an object that is effectively index.to_series().dt

Subsumes parts of #17117

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Aug 9, 2017

See my comment in the issue: #17134 (comment) which should be discussed first

@jbrockmendel
Copy link
Member Author

This can be closed at least until #17134 is resolved.

@jbrockmendel jbrockmendel deleted the index_dt_accessor branch December 8, 2017 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DISC: add accessor attributes to Index for consistency with Series
3 participants