We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89a656c commit 72f7f13Copy full SHA for 72f7f13
pandas/core/methods/selectn.py
@@ -105,10 +105,12 @@ class SelectNSeries(SelectN[Series]):
105
nordered : Series
106
"""
107
108
- def compute(self, ascending: bool) -> Series:
+ def compute(self, ascending: bool | Sequence[bool]) -> Series:
109
from pandas.core.reshape.concat import concat
110
111
- assert isinstance(ascending, bool)
+ if isinstance(ascending, Sequence):
112
+ assert len(ascending) == 1
113
+ ascending = ascending[0]
114
115
n = self.n
116
dtype = self.obj.dtype
0 commit comments