BUG: pd.to_numeric(..., downcast='unsigned') should accept 0 · Issue #14401 · pandas-dev/pandas (original) (raw)

with 0.19.0.

In [28]: pd.to_numeric(pd.Series([1,2,3]), downcast='unsigned')
Out[28]: 
0    1
1    2
2    3
dtype: uint8

In [29]: pd.to_numeric(pd.Series([0,1,2,3]), downcast='unsigned')
Out[29]: 
0    0
1    1
2    2
3    3
dtype: int64
In [30]: np.iinfo(np.uint8).min
Out[30]: 0

I think 0 is a legit uint8, so [29] should be uint8.