We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 644c10d commit 9afa6f1Copy full SHA for 9afa6f1
pandas/core/internals/concat.py
@@ -254,6 +254,15 @@ def _concat_homogeneous_fastpath(
254
"""
255
# assumes
256
# all(_is_homogeneous_mgr(mgr, first_dtype) for mgr, _ in in mgrs_indexers)
257
+
258
+ if all(not indexers for _, indexers in mgrs_indexers):
259
+ # https://github.com/pandas-dev/pandas/pull/52685#issuecomment-1523287739
260
+ arrs = [mgr.blocks[0].values.T for mgr, _ in mgrs_indexers]
261
+ arr = np.concatenate(arrs).T
262
+ bp = libinternals.BlockPlacement(slice(shape[0]))
263
+ nb = new_block_2d(arr, bp)
264
+ return nb
265
266
arr = np.empty(shape, dtype=first_dtype)
267
268
if first_dtype == np.float64:
0 commit comments