Beispiel #1
0
def test_astype_nansafe():
    # https://github.com/pandas-dev/pandas/pull/22343
    arr = IntegerArray([np.nan, 1, 2], dtype="Int8")

    with tm.assert_raises_regex(ValueError,
                                'cannot convert float NaN to integer'):
        arr.astype('uint32')