Skip to content

Commit 30c1f3c

Browse files
Fu-JieZeroto521
andauthored
Update janitor/functions/concatenate_columns.py
Co-authored-by: 40% <[email protected]>
1 parent adaaf36 commit 30c1f3c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

janitor/functions/concatenate_columns.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def concatenate_columns(
5151
if len(column_names) < 2:
5252
raise JanitorError("At least two columns must be specified")
5353

54+
df = df.copy() # avoid mutating original data
5455
df[new_column_name] = (
5556
df[column_names]
5657
.astype(str)

0 commit comments

Comments
 (0)