Skip to content

Commit

Permalink
Reapply perf improvement that was struck from pandas-dev#22725
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Oct 30, 2018
1 parent b07298d commit 2f94c13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pandas/core/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def cat_core(list_of_columns, sep):
nd.array
The concatenation of list_of_columns with sep
"""
if sep == '':
return np.sum(list_of_columns, axis=0)
list_with_sep = [sep] * (2 * len(list_of_columns) - 1)
list_with_sep[::2] = list_of_columns
return np.sum(list_with_sep, axis=0)
Expand Down

0 comments on commit 2f94c13

Please sign in to comment.