Skip to content

Commit

Permalink
dirty hack until pandas-dev#55271 is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
dalejung committed Jan 23, 2024
1 parent 5cabffa commit 499662f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pandas/tseries/frequencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import numpy as np

from pandas._libs import lib
from pandas.tseries.offsets import MonthBegin
from pandas._libs.algos import unique_deltas
from pandas._libs.tslibs import (
Timestamp,
Expand Down Expand Up @@ -504,9 +505,13 @@ def is_superperiod(source, target) -> bool:
"""
if target is None or source is None:
return False
original_source = to_offset(source)
source = _maybe_coerce_freq(source)
target = _maybe_coerce_freq(target)

if isinstance(original_source, MonthBegin) and target == 'D':
return False

if _is_annual(source):
if _is_annual(target):
return get_rule_month(source) == get_rule_month(target)
Expand Down

0 comments on commit 499662f

Please sign in to comment.