| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.pandas.api.typing.StringMethods.cat.html | [Back] [Original] |
Section Navigation
Concatenate strings in the Series/Index with given separator.
If others is specified, this function concatenates the Series/Index and elements of others element-wise.
Examples:
>>> import bigframes.pandas as bpd
You can concatenate each string in a Series to another string.
>>> s = bpd.Series(['Jane', 'John'])
>>> s.str.cat(" Doe")
0 Jane Doe
1 John Doe
dtype: string
You can concatenate another Series. By default left join is performed to align the corresponding elements.
>>> s.str.cat(bpd.Series([" Doe", " Foe", " Roe"]))
0 Jane Doe
1 John Foe
dtype: string
>>> s.str.cat(bpd.Series([" Doe", " Foe", " Roe"], index=[2, 0, 1]))
0 Jane Foe
1 John Roe
dtype: string
You can enforce an outer join.
>>> s.str.cat(bpd.Series([" Doe", " Foe", " Roe"]), join="outer")
0 Jane Doe
1 John Foe
2 <NA>
dtype: string
join ({'left', 'outer'}, default 'left') Determines the join-style between the calling Series and any Series in others (objects without an index need to match the length of the calling Series). To disable alignment, use .values on any Series/Index/DataFrame in others.
Series with concatenated strings.
Copyright 2019, Google.
Created using Sphinx 8.1.3.
Built with the PyData Sphinx Theme 0.19.0.
| Web Proxy Viewer | New URL | Original Page |