Skip to content

Commit a25d983

Browse files
authored
Update concatenate_columns.py
use astype("string")
1 parent 30c1f3c commit a25d983

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

janitor/functions/concatenate_columns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def concatenate_columns(
5454
df = df.copy() # avoid mutating original data
5555
df[new_column_name] = (
5656
df[column_names]
57-
.astype(str)
58-
.replace(["NaT", "nan", "<NA>"], "")
57+
.astype("string")
58+
.fillna("")
5959
.agg(sep.join, axis=1)
6060
)
6161

0 commit comments

Comments
 (0)