Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
MultiIndex.get_leves_values() returns inconsistent Index if there are NaNs #17924
Code Sample, a copy-pastable example if possible
In : pd.MultiIndex.from_arrays([['a', 'b', 'b'], [2, np.nan, 2]]).get_level_values(1) Out: Int64Index([2.0, nan, 2.0], dtype='float64')
Ironically, this is tested extensively in
I'm pretty sure the bug comes from this line, but at the moment I'm not sure what should replace it.
Float64Index([2.0, nan, 2.0], dtype='float64')