Skip to content

CLN: remove unused entries from _lite_rule_alias #56516

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pandas/_libs/tslibs/dtypes.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ cdef dict c_PERIOD_AND_OFFSET_DEPR_FREQSTR = {
"b": "B",
"c": "C",
"MIN": "min",
"US": "us",
"NS": "ns",
}

cdef str INVALID_FREQ_ERR_MSG = "Invalid frequency: {0}"
Expand Down
15 changes: 8 additions & 7 deletions pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4695,15 +4695,16 @@ _lite_rule_alias = {
"YS": "YS-JAN", # YearBegin(month=1),
"BYE": "BYE-DEC", # BYearEnd(month=12),
"BYS": "BYS-JAN", # BYearBegin(month=1),

"Min": "min",
"min": "min",
"ms": "ms",
"us": "us",
"ns": "ns",
}

_dont_uppercase = {"h", "bh", "cbh", "MS", "ms", "s"}
_dont_uppercase = {
"h",
"bh",
"cbh",
"MS",
"ms",
"s",
}


INVALID_FREQ_ERR_MSG = "Invalid frequency: {0}"
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/arrays/test_datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ def test_date_range_frequency_M_Q_Y_raises(self, freq):
with pytest.raises(ValueError, match=msg):
pd.date_range("1/1/2000", periods=4, freq=freq)

@pytest.mark.parametrize("freq_depr", ["2MIN", "2mS", "2Us"])
@pytest.mark.parametrize("freq_depr", ["2MIN", "2NS", "2US"])
def test_date_range_uppercase_frequency_deprecated(self, freq_depr):
# GH#9586, GH#54939
depr_msg = f"'{freq_depr[1:]}' is deprecated and will be removed in a "
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/tslibs/test_to_offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def test_to_offset_lowercase_frequency_raises(freq_depr):
to_offset(freq_depr)


@pytest.mark.parametrize("freq_depr", ["2MIN", "2Us", "2NS"])
@pytest.mark.parametrize("freq_depr", ["2MIN", "2US", "2NS"])
def test_to_offset_uppercase_frequency_deprecated(freq_depr):
# GH#54939
depr_msg = f"'{freq_depr[1:]}' is deprecated and will be removed in a "
Expand Down
Loading