Skip to content

Commit 11038f8

Browse files
author
Nicholas Ver Halen
committed
Made it so that 0 was included in uint8
1 parent 2e77536 commit 11038f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/tools/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def to_numeric(arg, errors='raise', downcast=None):
205205

206206
if downcast in ('integer', 'signed'):
207207
typecodes = np.typecodes['Integer']
208-
elif downcast == 'unsigned' and np.min(values) > 0:
208+
elif downcast == 'unsigned' and np.min(values) >= 0:
209209
typecodes = np.typecodes['UnsignedInteger']
210210
elif downcast == 'float':
211211
typecodes = np.typecodes['Float']

0 commit comments

Comments
 (0)