Skip to content

Commit 232520f

Browse files
committed
DOC: update documentation for pandas.Series.dt.is_month_last
1 parent 7840d52 commit 232520f

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

pandas/core/indexes/datetimes.py

+26-1
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,32 @@ def freq(self, value):
17561756
is_month_end = _field_accessor(
17571757
'is_month_end',
17581758
'is_month_end',
1759-
"Logical indicating if last day of month (defined by frequency)")
1759+
"""
1760+
Return a boolean indicating if the date is the last day of the month.
1761+
1762+
Returns
1763+
-------
1764+
is_month_end : Series of boolean
1765+
1766+
See Also
1767+
--------
1768+
is_month_start : Returns a boolean indicating if the date is the first day of the month.
1769+
1770+
Examples
1771+
--------
1772+
>>> import pandas as pd
1773+
>>> dates = pd.Series(pd.date_range("2018-02-27", periods = 3))
1774+
>>> dates
1775+
0 2018-02-27
1776+
1 2018-02-28
1777+
2 2018-03-01
1778+
dtype: datetime64[ns]
1779+
>>> dates.dt.is_month_end
1780+
0 False
1781+
1 True
1782+
2 False
1783+
dtype: bool
1784+
""")
17601785
is_quarter_start = _field_accessor(
17611786
'is_quarter_start',
17621787
'is_quarter_start',

0 commit comments

Comments
 (0)