pandas.Series.str.cat

pandas 3.1.1 · Series and accessors · method

Join all strings into one value, or concatenate each row with aligned strings from other inputs.

Call syntax

Series.str.cat(others=None, sep=None, na_rep=None, join='left')

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
others Optional
Positional or keyword
Default None
Series, Index, DataFrame, np.ndarray or list-like
sep Optional
Positional or keyword
Default None
str

Specify the separator between fields or string pieces.

na_rep Optional
Positional or keyword
Default None
str or None

Choose the text used to display missing values.

join Optional
Positional or keyword
Default 'left'
{'left', 'right', 'outer', 'inner'}

Select which labels to retain when bringing multiple axes into alignment.

Returns

str, Series or Index