8000 fix infer_freq not working for H freq with DST (fix #39556 and #8772) · sdementen/pandas@7745715 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7745715

Browse files
authored
fix infer_freq not working for H freq with DST (fix pandas-dev#39556 and pandas-dev#8772)
Fixes the issues pandas-dev#39556 and pandas-dev#8772 by ensuring that the check for delta being a multiple of a frequency also checks the delta is not 0 (which is a multiple of any number).
1 parent d558bce commit 7745715

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/tseries/frequencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def _infer_daily_rule(self):
414414

415415

416416
def _is_multiple(us, mult: int) -> bool:
417-
return us % mult == 0
417+
return us and (us % mult == 0)
418418

419419

420420
def _maybe_add_count(base: str, count: float) -> str:

0 commit comments

Comments
 (0)
0