We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5919f9d commit c046dfbCopy full SHA for c046dfb
pandas/core/strings.py
@@ -59,6 +59,9 @@ def cat_core(list_of_columns: List, sep: str):
59
nd.array
60
The concatenation of list_of_columns with sep
61
"""
62
+ if sep == "":
63
+ # no need to interleave sep if it is empty
64
+ return np.sum(list_of_columns, axis=0)
65
list_with_sep = [sep] * (2 * len(list_of_columns) - 1)
66
list_with_sep[::2] = list_of_columns
67
return np.sum(list_with_sep, axis=0)
0 commit comments