We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11038f8 commit 11a421dCopy full SHA for 11a421d
pandas/tools/tests/test_util.py
@@ -391,6 +391,14 @@ def test_downcast(self):
391
res = pd.to_numeric(data, downcast=downcast)
392
tm.assert_numpy_array_equal(res, expected)
393
394
+ #check that 0 works as a unsigned downcast
395
+
396
+ data = [0, 1, 2, 3]
397
+ res = pd.to_numeric(data, downcast=downcast)
398
+ expected = np.array(data, dtype=np.uint8)
399
+ tm.assert_numpy_array_equal(res, expected)
400
401
402
# the smallest integer dtype need not be np.(u)int8
403
data = ['256', 257, 258]
404
0 commit comments