Skip to content

Commit 94893f0

Browse files
committed
removed redundant ndim checks
1 parent 3a94c7f commit 94893f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/generic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9286,7 +9286,7 @@ def ranker(blk_values):
92869286
pct=pct,
92879287
)
92889288
else:
9289-
if blk_values.ndim > 1 and axis_int == 0:
9289+
if axis_int == 0:
92909290
ranks = algos.rank(
92919291
blk_values.T,
92929292
axis=axis_int,
@@ -9317,7 +9317,7 @@ def ranker(blk_values):
93179317
else:
93189318
data = self
93199319

9320-
should_transpose = data.ndim > 1 and axis_int == 1
9320+
should_transpose = axis_int == 1
93219321

93229322
if should_transpose:
93239323
data = data.T

0 commit comments

Comments
 (0)