From 7031c97c48d0c108f4980dbbff8dd50d34bf0db3 Mon Sep 17 00:00:00 2001 From: Nicholas Ver Halen Date: Wed, 12 Oct 2016 16:13:38 -0500 Subject: [PATCH] Made it so that 0 was included in uint8 --- pandas/tools/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tools/util.py b/pandas/tools/util.py index fec56328c1721..b50bf9dc448bc 100644 --- a/pandas/tools/util.py +++ b/pandas/tools/util.py @@ -205,7 +205,7 @@ def to_numeric(arg, errors='raise', downcast=None): if downcast in ('integer', 'signed'): typecodes = np.typecodes['Integer'] - elif downcast == 'unsigned' and np.min(values) > 0: + elif downcast == 'unsigned' and np.min(values) >= 0: typecodes = np.typecodes['UnsignedInteger'] elif downcast == 'float': typecodes = np.typecodes['Float']