BUG: Select an all-zero sparse series by indexer results in NaN #34526
Labels
Bug
good first issue
Indexing
Related to indexing on series/frames, not to indexes themselves
Needs Tests
Unit test(s) needed to prevent regressions
Sparse
Sparse Data Type
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
Index slice an all-zero sparse series by indexer (whether by bool array or index array) results in NaN. It should be the
fill_value
of the series.Expected Output
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: