Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test added
  • Loading branch information
rxd330 committed Apr 5, 2022
commit 931147c828f77d8c86cd3473f9ddddcba5e823bb
12 changes: 12 additions & 0 deletions pandas/tests/tseries/frequencies/test_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
Timestamp,
date_range,
period_range,
DataFrame,
Timedelta
)
import pandas._testing as tm
from pandas.core.tools.datetimes import to_datetime
Expand Down Expand Up @@ -507,3 +509,13 @@ def test_ms_vs_capital_ms():
def test_infer_freq_warn_deprecated():
with tm.assert_produces_warning(FutureWarning):
frequencies.infer_freq(date_range(2022, periods=3), warn=False)

def test_no_overflow_of_freq_and_time_in_dataframe():
# GH 35665
# https://github.com/pandas-dev/pandas/issues/35665
df = DataFrame({'string_one':['2132131SSS'], 'time': [Timedelta('0 days 00:00:00.990000')]})
try:
for _, row in df.iterrows():
row
except OverflowError:
assert False, 'Regression, see GH 35665'