Change UInt64Index._na_value from 0 to np.nan #18398
Labels
Bug
Dtype Conversions
Unexpected or buggy dtype conversions
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone
Code Sample, a copy-pastable example if possible
Problem description
The basic logic here is that
UInt64Index
should mimicInt64Index
in that it cannot hold na. As it's currently defined,UInt64Index
can hold it's_na_value
, which brings about issues for internal code that uses_na_value
.Relevant discussion here.
Simply making the change from 0 to
np.nan
breaks a couple tests, and brings to light an existing bug, so there's a little more work than just changing_na_value
. Will submit a PR shortly.The text was updated successfully, but these errors were encountered: