bigframes.pandas.api.typing.StringMethods.repeat#

StringMethods.repeat(repeats: int) T[source]#

Duplicate each string in the Series or Index.

Examples:

>>> import bigframes.pandas as bpd
>>> s = bpd.Series(['a', 'b', 'c'])
>>> s
0    a
1    b
2    c
dtype: string
>>> s.str.repeat(repeats=2)
0    aa
1    bb
2    cc
dtype: string
Parameters:

repeats – int or sequence of int Same value for all (int) or different value per (sequence).

Returns:

Series or Index of repeated string

objects specified by input parameter repeats.

Return type:

bigframes.series.Series