We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c238cec commit 416035bCopy full SHA for 416035b
pandas/tests/tools/test_to_datetime.py
@@ -1217,6 +1217,8 @@ def test_unit_mixed(self, cache):
1217
1218
@pytest.mark.parametrize("cache", [True, False])
1219
def test_unit_rounding(self, cache):
1220
+ # GH 14156 & GH 20445: argument will incur floating point errors
1221
+ # but no premature rounding
1222
result = pd.to_datetime(1434743731.8770001, unit="s", cache=cache)
1223
expected = pd.Timestamp("2015-06-19 19:55:31.877000192")
1224
assert result == expected
@@ -1452,6 +1454,7 @@ def test_to_datetime_unit(self):
1452
1454
]
1453
1455
+ [NaT]
1456
)
1457
+ # GH20455 argument will incur floating point errors but no premature rounding
1458
result = result.round("ms")
1459
tm.assert_series_equal(result, expected)
1460
0 commit comments