Skip to content

Commit 416035b

Browse files
committed
restore/add comments re: floating point errors
1 parent c238cec commit 416035b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/tests/tools/test_to_datetime.py

+3
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,8 @@ def test_unit_mixed(self, cache):
12171217

12181218
@pytest.mark.parametrize("cache", [True, False])
12191219
def test_unit_rounding(self, cache):
1220+
# GH 14156 & GH 20445: argument will incur floating point errors
1221+
# but no premature rounding
12201222
result = pd.to_datetime(1434743731.8770001, unit="s", cache=cache)
12211223
expected = pd.Timestamp("2015-06-19 19:55:31.877000192")
12221224
assert result == expected
@@ -1452,6 +1454,7 @@ def test_to_datetime_unit(self):
14521454
]
14531455
+ [NaT]
14541456
)
1457+
# GH20455 argument will incur floating point errors but no premature rounding
14551458
result = result.round("ms")
14561459
tm.assert_series_equal(result, expected)
14571460

0 commit comments

Comments
 (0)