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

ENH: Add days_in_month property to Timestamp/DatetimeIndex/... (GH9572) #9605

Merged
merged 1 commit into from
Mar 6, 2015
Merged

ENH: Add days_in_month property to Timestamp/DatetimeIndex/... (GH9572) #9605

merged 1 commit into from
Mar 6, 2015

Conversation

josham
Copy link
Contributor

@josham josham commented Mar 6, 2015

closes #9572

Added days_in_month property (compatibility alias daysinmonth) to Timestamp, DatetimeIndex, Period, PeriodIndex,
Series.dt.

Although not mentioned in the GH issue, I added the property to Period and PeriodIndex to be consistent with the others: dayofweek, dayofyear, etc.

@jreback jreback added Enhancement Datetime Datetime data dtype labels Mar 6, 2015
@jreback jreback added this to the 0.16.0 milestone Mar 6, 2015
@jreback
Copy link
Contributor

jreback commented Mar 6, 2015

@josham looks gr8.

after I wrote up the issue I realized that this should prob be named daysinmonth (even though I like days_in_month better), for compat with the other field naming schema.

we could change these to a proper naming convention, but that's a different issue.

@jreback
Copy link
Contributor

jreback commented Mar 6, 2015

see #9606
actually might as well simply add both days_in_month/daysinmonth and call it a day. (and maybe just leave the tests alone).

@josham
Copy link
Contributor Author

josham commented Mar 6, 2015

OK, I'll add daysinmonth

days_in_month (compatibility alias ``daysinmonth``) added to Timestamp, DatetimeIndex, Period, PeriodIndex,
Series.dt
jreback added a commit that referenced this pull request Mar 6, 2015
ENH: Add days_in_month property to Timestamp/DatetimeIndex/... (GH9572)
@jreback jreback merged commit bb9d35c into pandas-dev:master Mar 6, 2015
@jreback
Copy link
Contributor

jreback commented Mar 6, 2015

thanks @josham

keep em coming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: add days_in_month to Timestamp/DatetimeIndex/.dt
2 participants