Skip to content

ENH: add month_name to DatetimeIndex and .dt #12805

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

Closed
BastiaanBergman opened this issue Apr 5, 2016 · 1 comment · Fixed by #18164
Closed

ENH: add month_name to DatetimeIndex and .dt #12805

BastiaanBergman opened this issue Apr 5, 2016 · 1 comment · Fixed by #18164
Labels
Compat pandas objects compatability with Numpy or Python functions Datetime Datetime data dtype Enhancement
Milestone

Comments

@BastiaanBergman
Copy link

Add a month name property to DatetimeIndex and the .dt accessor; similar to weekday_name (GH12803).

Code Sample:

i = pd.date_range('20150112 08:34:23', periods = 4, freq = '1D')
i.month_name
d = pd.Timestamp("2016-04-04")
d.month_name
s = pd.Series(i, range(4))
s.dt.month_name

Expected Output:

array(['January', 'January', 'January', 'January'], dtype=object)
'April'
0       January
1       January
2       January
3       January
dtype: object
@jreback
Copy link
Contributor

jreback commented Apr 6, 2016

xref #11128

@jreback jreback added Enhancement Datetime Datetime data dtype Compat pandas objects compatability with Numpy or Python functions labels Apr 6, 2016
@jreback jreback added this to the Next Major Release milestone Apr 6, 2016
@jreback jreback modified the milestones: Next Major Release, 0.22.0 Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Datetime Datetime data dtype Enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants