-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
Closed
Labels
NA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arraysNeeds TestsUnit test(s) needed to prevent regressionsUnit test(s) needed to prevent regressionsgood first issue
Milestone
Description
On the current PR there are a couple "issues" with handling out of bounds values.
This follows NumPy's behavior, but is maybe not what the user wants
In [18]: pd.core.arrays.IntegerArray([-1, 2, 3], dtype=pd.core.arrays.integer.UInt16Dtype)
Out[18]: IntegerArray([65535, 2, 3], dtype='UInt16')
In [19]: x = pd.core.arrays.IntegerArray([-1, 2, 3], dtype=pd.core.arrays.integer.UInt16Dtype)
In [20]: x[0] = -1
In [21]: x
Out[21]: IntegerArray([65535, 2, 3], dtype='UInt16')
These could perhaps raise a ValueError
instead.
xref #21160
Metadata
Metadata
Assignees
Labels
NA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arraysNeeds TestsUnit test(s) needed to prevent regressionsUnit test(s) needed to prevent regressionsgood first issue