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

API: DatetimeIndex.strftime should return an Index #20127

Closed
jreback opened this Issue Mar 10, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@jreback
Contributor

jreback commented Mar 10, 2018

Index.strftime should be returning an Index and not an array, we do this for other accessors. see https://github.com/pandas-dev/pandas/pull/20103/files#r173622263

In [6]: pd.date_range('20130101',periods=3).hour
Out[6]: Int64Index([0, 0, 0], dtype='int64')

In [7]: pd.date_range('20130101',periods=3).strftime('%Y%m%d')
Out[7]: array(['20130101', '20130102', '20130103'], dtype='<U8')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment