Skip to content

Commit 74e6c78

Browse files
IHackPyjorisvandenbossche
authored andcommitted
DOC: update the Period.daysinmonth docstring (#20295)
1 parent b2e472a commit 74e6c78

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

pandas/_libs/tslibs/period.pyx

+18
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,24 @@ cdef class _Period(object):
12941294

12951295
@property
12961296
def daysinmonth(self):
1297+
"""
1298+
Get the total number of days of the month that the Period falls in.
1299+
1300+
Returns
1301+
-------
1302+
int
1303+
1304+
See Also
1305+
--------
1306+
Period.days_in_month : Return the days of the month
1307+
Period.dayofyear : Return the day of the year
1308+
1309+
Examples
1310+
--------
1311+
>>> p = pd.Period("2018-03-11", freq='H')
1312+
>>> p.daysinmonth
1313+
31
1314+
"""
12971315
return self.days_in_month
12981316

12991317
@property

0 commit comments

Comments
 (0)