Skip to content

Commit 09a9f80

Browse files
authored
pandas-dev#25087: Fix .dropna() functionality for categorical indices
1 parent 89d8289 commit 09a9f80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4615,7 +4615,7 @@ def dropna(self, axis=0, how='any', thresh=None, subset=None,
46154615
else:
46164616
raise TypeError('must specify how or thresh')
46174617

4618-
result = self.loc(axis=axis)[mask]
4618+
result = self._take(mask.to_numpy().nonzero()[0], axis=axis)
46194619

46204620
if inplace:
46214621
self._update_inplace(result)

0 commit comments

Comments
 (0)