Skip to content

Commit bc8ac6a

Browse files
add LastWeekOfMonth to prefix_mapping
1 parent 39bd3d3 commit bc8ac6a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

pandas/_libs/tslibs/offsets.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4676,6 +4676,7 @@ prefix_mapping = {
46764676
Hour, # 'h'
46774677
Day, # 'D'
46784678
WeekOfMonth, # 'WOM'
4679+
LastWeekOfMonth, # 'LWOM'
46794680
FY5253,
46804681
FY5253Quarter,
46814682
]

pandas/tests/tslibs/test_to_offset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
("2SME-16", offsets.SemiMonthEnd(2, day_of_month=16)),
3232
("2SMS-14", offsets.SemiMonthBegin(2, day_of_month=14)),
3333
("2SMS-15", offsets.SemiMonthBegin(2)),
34+
("LWOM-MON", offsets.LastWeekOfMonth()),
3435
],
3536
)
3637
def test_to_offset(freq_input, expected):

0 commit comments

Comments
 (0)