Skip to content

Commit f46ce84

Browse files
jrebackreidy-p
authored andcommitted
simplify
1 parent 4d7e1cf commit f46ce84

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/core/groupby/groupby.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -4740,10 +4740,7 @@ def _wrap_transformed_output(self, output, names=None):
47404740

47414741
def _wrap_agged_blocks(self, items, blocks):
47424742
if not self.as_index:
4743-
if blocks[0].values.ndim > 1:
4744-
index = np.arange(blocks[0].values.shape[1])
4745-
else:
4746-
index = np.arange(blocks[0].values.shape[0])
4743+
index = np.arange(blocks[0].values.shape[-1])
47474744
mgr = BlockManager(blocks, [items, index])
47484745
result = DataFrame(mgr)
47494746

0 commit comments

Comments
 (0)