We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c768e34 commit 48895caCopy full SHA for 48895ca
pandas/tests/scalar/period/test_period.py
@@ -486,6 +486,13 @@ def test_period_cons_combined(self):
486
with pytest.raises(ValueError, match=msg):
487
Period("2011-01", freq="1D1W")
488
489
+ @pytest.mark.parametrize("hour", range(24))
490
+ def test_period_large_ordinal(self, hour):
491
+ # Issue #36430
492
+ # Integer overflow for Period over the maximum timestamp
493
+ p = pd.Period(ordinal=2562048 + hour, freq="1H")
494
+ assert p.hour == hour
495
+
496
497
class TestPeriodMethods:
498
def test_round_trip(self):
0 commit comments