@@ -2543,7 +2543,6 @@ cdef class MonthEnd(MonthOffset):
2543
2543
DateOffset of one month end.
2544
2544
2545
2545
MonthEnd goes to the next date which is an end of the month.
2546
- To get the end of the current month pass the parameter n equals 0.
2547
2546
2548
2547
See Also
2549
2548
--------
@@ -2559,10 +2558,10 @@ cdef class MonthEnd(MonthOffset):
2559
2558
>>> ts + pd.offsets.MonthEnd()
2560
2559
Timestamp('2022-02-28 00:00:00')
2561
2560
2562
- If you want to get the end of the current month pass the parameter n equals 0 :
2561
+ If you want to get the end of the current month:
2563
2562
2564
2563
>>> ts = pd.Timestamp(2022, 1, 31)
2565
- >>> ts + pd.offsets.MonthEnd(0 )
2564
+ >>> pd.offsets.MonthEnd().rollforward(ts )
2566
2565
Timestamp('2022-01-31 00:00:00')
2567
2566
"""
2568
2567
_period_dtype_code = PeriodDtypeCode.M
@@ -2589,7 +2588,6 @@ cdef class BusinessMonthEnd(MonthOffset):
2589
2588
DateOffset increments between the last business day of the month.
2590
2589
2591
2590
BusinessMonthEnd goes to the next date which is the last business day of the month.
2592
- To get the last business day of the current month pass the parameter n equals 0.
2593
2591
2594
2592
Examples
2595
2593
--------
@@ -2601,11 +2599,10 @@ cdef class BusinessMonthEnd(MonthOffset):
2601
2599
>>> ts + pd.offsets.BMonthEnd()
2602
2600
Timestamp('2022-12-30 00:00:00')
2603
2601
2604
- If you want to get the end of the current business month
2605
- pass the parameter n equals 0:
2602
+ If you want to get the end of the current business month:
2606
2603
2607
2604
>>> ts = pd.Timestamp(2022, 11, 30)
2608
- >>> ts + pd.offsets.BMonthEnd(0 )
2605
+ >>> pd.offsets.BMonthEnd().rollforward(ts )
2609
2606
Timestamp('2022-11-30 00:00:00')
2610
2607
"""
2611
2608
_prefix = " BM"
0 commit comments