Skip to content

Commit b6318f6

Browse files
committed
adds a test for overflow problem pandas-dev#35665
1 parent 23f74d3 commit b6318f6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tests/frame/test_constructors.py

+9
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ def test_constructor_from_ndarray_with_str_dtype(self):
8282
df = DataFrame(arr, dtype=str)
8383
expected = DataFrame(arr.astype(str))
8484
tm.assert_frame_equal(df, expected)
85+
86+
def test_no_overflow_of_freq_and_time_in_dataframe(self):
87+
# GH 35665
88+
foo = pd.DataFrame(
89+
{'some_string': ['2222Y3'],
90+
'time': [pd.Timedelta("0 days 00:00:00.990000")]
91+
})
92+
for _, row in foo.iterrows():
93+
assert row.dtype=="object"
8594

8695
def test_constructor_from_2d_datetimearray(self, using_array_manager):
8796
dti = date_range("2016-01-01", periods=6, tz="US/Pacific")

0 commit comments

Comments
 (0)