Skip to content

Commit b3337d0

Browse files
committed
Reapply perf improvement that was struck from pandas-dev#22725
1 parent 349c0c8 commit b3337d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/strings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def cat_core(list_of_columns, sep):
5454
nd.array
5555
The concatenation of list_of_columns with sep
5656
"""
57+
if sep == '':
58+
return np.sum(list_of_columns, axis=0)
5759
list_with_sep = [sep] * (2 * len(list_of_columns) - 1)
5860
list_with_sep[::2] = list_of_columns
5961
return np.sum(list_with_sep, axis=0)

0 commit comments

Comments
 (0)