Closed
Description
In [25]: s = pd.Series([1, 2, 3, 4], dtype='Int64')
In [26]: s
Out[26]:
0 1
1 2
2 3
3 4
dtype: Int64
In [27]: s.astype('UInt32')
...
TypeError: Cannot cast array from dtype('int64') to dtype('uint32') according to the rule 'same_kind'
with numpy dtypes this works:
In [30]: s = pd.Series([1, 2, 3, 4], dtype='int64')
In [31]: s.astype('uint32')
Out[31]:
0 1
1 2
2 3
3 4
dtype: uint32