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 9345465 commit 7533f64Copy full SHA for 7533f64
pandas/tests/indexing/test_iloc.py
@@ -770,7 +770,7 @@ def test_iloc_mask(self):
770
for idx in [None, "index", "locs"]:
771
mask = (df.nums > 2).values
772
if idx:
773
- mask_index = getattr(df, idx if idx == "index" else "locs")[::-1]
+ mask_index = getattr(df, idx)[::-1]
774
mask = Series(mask, list(mask_index))
775
for method in ["", ".loc", ".iloc"]:
776
try:
@@ -779,10 +779,7 @@ def test_iloc_mask(self):
779
else:
780
accessor = df
781
answer = str(bin(accessor[mask]["nums"].sum()))
782
- except (
783
- ValueError,
784
- IndexingError,
785
- ) as err:
+ except (ValueError, IndexingError) as err:
786
answer = str(err)
787
788
key = (
0 commit comments