Skip to content

Commit 4942bac

Browse files
authored
Fix: Using bm_axis check
1 parent a86745e commit 4942bac

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pandas/core/reshape/concat.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,12 @@ def _get_concat_axis_series(
710710
) -> Index:
711711
"""Return result concat axis when concatenating Series objects."""
712712
if ignore_index:
713-
total_length = sum(len(obj) for obj in objs)
714-
return default_index(total_length)
713+
- total_length = sum(len(obj) for obj in objs)
714+
+ if bm_axis:
715+
+ total_length = len(objs)
716+
+ else:
717+
+ total_length = sum(len(obj) for obj in objs)
718+
return default_index(total_length)
715719
elif bm_axis == 0:
716720
indexes = [x.index for x in objs]
717721
if keys is None:

0 commit comments

Comments
 (0)