Skip to content

Commit 156620e

Browse files
committed
dirty hack until pandas-dev#55271 is closed
1 parent 70379e8 commit 156620e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tseries/frequencies.py

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import numpy as np
66

77
from pandas._libs import lib
8+
from pandas.tseries.offsets import MonthBegin
89
from pandas._libs.algos import unique_deltas
910
from pandas._libs.tslibs import (
1011
Timestamp,
@@ -504,9 +505,13 @@ def is_superperiod(source, target) -> bool:
504505
"""
505506
if target is None or source is None:
506507
return False
508+
original_source = to_offset(source)
507509
source = _maybe_coerce_freq(source)
508510
target = _maybe_coerce_freq(target)
509511

512+
if isinstance(original_source, MonthBegin) and target == 'D':
513+
return False
514+
510515
if _is_annual(source):
511516
if _is_annual(target):
512517
return get_rule_month(source) == get_rule_month(target)

0 commit comments

Comments
 (0)