- 2.28.0 (latest)
 - 2.27.0
 - 2.26.0
 - 2.25.0
 - 2.24.0
 - 2.23.0
 - 2.22.0
 - 2.21.0
 - 2.20.0
 - 2.19.0
 - 2.18.0
 - 2.17.0
 - 2.16.0
 - 2.15.0
 - 2.14.0
 - 2.13.0
 - 2.12.0
 - 2.11.0
 - 2.10.0
 - 2.9.0
 - 2.8.0
 - 2.7.0
 - 2.6.0
 - 2.5.0
 - 2.4.0
 - 2.3.0
 - 2.2.0
 - 1.36.0
 - 1.35.0
 - 1.34.0
 - 1.33.0
 - 1.32.0
 - 1.31.0
 - 1.30.0
 - 1.29.0
 - 1.28.0
 - 1.27.0
 - 1.26.0
 - 1.25.0
 - 1.24.0
 - 1.22.0
 - 1.21.0
 - 1.20.0
 - 1.19.0
 - 1.18.0
 - 1.17.0
 - 1.16.0
 - 1.15.0
 - 1.14.0
 - 1.13.0
 - 1.12.0
 - 1.11.1
 - 1.10.0
 - 1.9.0
 - 1.8.0
 - 1.7.0
 - 1.6.0
 - 1.5.0
 - 1.4.0
 - 1.3.0
 - 1.2.0
 - 1.1.0
 - 1.0.0
 - 0.26.0
 - 0.25.0
 - 0.24.0
 - 0.23.0
 - 0.22.0
 - 0.21.0
 - 0.20.1
 - 0.19.2
 - 0.18.0
 - 0.17.0
 - 0.16.0
 - 0.15.0
 - 0.14.1
 - 0.13.0
 - 0.12.0
 - 0.11.0
 - 0.10.0
 - 0.9.0
 - 0.8.0
 - 0.7.0
 - 0.6.0
 - 0.5.0
 - 0.4.0
 - 0.3.0
 - 0.2.0
 
StringMethods(
    data=None,
    index: vendored_pandas_typing.Axes | None = None,
    dtype: typing.Optional[
        bigframes.dtypes.DtypeString | bigframes.dtypes.Dtype
    ] = None,
    name: str | None = None,
    copy: typing.Optional[bool] = None,
    *,
    session: typing.Optional[bigframes.session.Session] = None
)Vectorized string functions for Series and Index.
NAs stay NA unless handled otherwise by a particular method. Patterned after Python's string methods, with some inspiration from R's stringr package.
Methods
capitalize
capitalize() -> bigframes.series.SeriesConvert strings in the Series/Index to be capitalized.
Equivalent to str.capitalize.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series with captitalized strings. | 
cat
cat(
    others: typing.Union[str, bigframes.series.Series],
    *,
    join: typing.Literal["outer", "left"] = "left"
) -> bigframes.series.SeriesConcatenate strings in the Series/Index with given separator.
If others is specified, this function concatenates the Series/Index
and elements of others element-wise.
| Parameter | |
|---|---|
| Name | Description | 
join | 
        
          {'left', 'outer'}, default 'left'
          Determines the join-style between the calling Series and any Series in   | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series with concatenated strings. | 
center
center(width: int, fillchar: str = " ") -> bigframes.series.SeriesPad left and right side of strings in the Series/Index.
Equivalent to str.center.
| Parameters | |
|---|---|
| Name | Description | 
width | 
        
          int
          Minimum width of resulting string; additional characters will be filled with character defined in   | 
      
fillchar | 
        
          str, default ' '
          Additional character for filling, default is whitespace.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Returns Series or Index with minimum number of char in object. | 
contains
contains(
    pat, case: bool = True, flags: int = 0, *, regex: bool = True
) -> bigframes.series.SeriesTest if pattern or regex is contained within a string of a Series or Index.
Return boolean Series or Index based on whether a given pattern or regex is contained within a string of a Series or Index.
| Parameters | |
|---|---|
| Name | Description | 
pat | 
        
          str, re.Pattern
          Character sequence or regular expression.  | 
      
case | 
        
          bool, default True
          If True, case sensitive.  | 
      
flags | 
        
          int, default 0
          Flags to pass through to the re module, e.g. re.IGNORECASE.  | 
      
regex | 
        
          bool, default True
          If True, assumes the pat is a regular expression. If False, treats the pat as a literal string.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        A Series or Index of boolean values indicating whether the given pattern is contained within the string of each element of the Series or Index. | 
endswith
endswith(pat: typing.Union[str, tuple[str, ...]]) -> bigframes.series.SeriesTest if the end of each string element matches a pattern.
| Parameter | |
|---|---|
| Name | Description | 
pat | 
        
          str, tuple[str, ...]
          Character sequence or tuple of strings. Regular expressions are not accepted.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        A Series of booleans indicating whether the given pattern matches the end of each string element. | 
extract
extract(pat: str, flags: int = 0) -> bigframes.dataframe.DataFrameExtract capture groups in the regex pat as columns in a DataFrame.
For each subject string in the Series, extract groups from the
first match of regular expression pat.
find
find(
    sub: str, start: typing.Optional[int] = None, end: typing.Optional[int] = None
) -> bigframes.series.SeriesReturn lowest indexes in each strings in the Series/Index.
Each of returned indexes corresponds to the position where the
substring is fully contained between [start:end]. Return -1 on
failure. Equivalent to standard str.find.
| Parameters | |
|---|---|
| Name | Description | 
start | 
        
          int, default 0
          Left edge index.  | 
      
end | 
        
          None
          Right edge index.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series with lowest indexes in each strings. | 
fullmatch
fullmatch(pat, case=True, flags=0) -> bigframes.series.SeriesDetermine if each string entirely matches a regular expression.
| Parameters | |
|---|---|
| Name | Description | 
pat | 
        
          str
          Character sequence or regular expression.  | 
      
case | 
        
          bool
          If True, case sensitive.  | 
      
flags | 
        
          int, default 0
          Regex module flags, e.g. re.IGNORECASE.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series of boolean values | 
get
get(i: int) -> bigframes.series.SeriesExtract element from each component at specified position or with specified key.
Extract element from lists, tuples, dict, or strings in each element in the Series/Index.
| Parameter | |
|---|---|
| Name | Description | 
i | 
        
          int
          Position or key of element to extract.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series | 
isalnum
isalnum() -> bigframes.series.SeriesCheck whether all characters in each string are alphanumeric.
This is equivalent to running the Python string method
str.isalnum for each element of the Series/Index. If a string
has zero characters, False is returned for that check.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series or Index of boolean values with the same length as the original Series/Index. | 
isalpha
isalpha() -> bigframes.series.SeriesCheck whether all characters in each string are alphabetic.
This is equivalent to running the Python string method
str.isalpha for each element of the Series/Index. If a string
has zero characters, False is returned for that check.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series with the same length as the originalSeries/Index. | 
isdecimal
isdecimal() -> bigframes.series.SeriesCheck whether all characters in each string are decimal.
This is equivalent to running the Python string method
str.isdecimal for each element of the Series/Index. If a string
has zero characters, False is returned for that check.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series or Index of boolean values with the same length as the original Series/Index. | 
isdigit
isdigit() -> bigframes.series.SeriesCheck whether all characters in each string are digits.
This is equivalent to running the Python string method
str.isdigit for each element of the Series/Index. If a string
has zero characters, False is returned for that check.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series with the same length as the originalSeries/Index. | 
islower
islower() -> bigframes.series.SeriesCheck whether all characters in each string are lowercase.
This is equivalent to running the Python string method
str.islower for each element of the Series/Index. If a string
has zero characters, False is returned for that check.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series or Index of boolean values with the same length as the original Series/Index. | 
isnumeric
isnumeric() -> bigframes.series.SeriesCheck whether all characters in each string are numeric.
This is equivalent to running the Python string method
str.isnumeric for each element of the Series/Index. If a string
has zero characters, False is returned for that check.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series or Index of boolean values with the same length as the original Series/Index. | 
isspace
isspace() -> bigframes.series.SeriesCheck whether all characters in each string are whitespace.
This is equivalent to running the Python string method
str.isspace for each element of the Series/Index. If a string
has zero characters, False is returned for that check.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series or Index of boolean values with the same length as the original Series/Index. | 
isupper
isupper() -> bigframes.series.SeriesCheck whether all characters in each string are uppercase.
This is equivalent to running the Python string method
str.isupper for each element of the Series/Index. If a string
has zero characters, False is returned for that check.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series or Index of boolean values with the same length as the original Series/Index. | 
len
len() -> bigframes.series.SeriesCompute the length of each element in the Series/Index.
The element may be a sequence (such as a string, tuple or list) or a collection (such as a dictionary).
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        A Series or Index of integer values indicating the length of each element in the Series or Index. | 
ljust
ljust(width, fillchar=" ") -> bigframes.series.SeriesPad right side of strings in the Series/Index up to width.
| Parameters | |
|---|---|
| Name | Description | 
width | 
        
          int
          Minimum width of resulting string; additional characters will be filled with character defined in   | 
      
fillchar | 
        
          str, default ' '
          Additional character for filling, default is whitespace.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Returns Series or Index with minimum number of char in object. | 
lower
lower() -> bigframes.series.SeriesConvert strings in the Series/Index to lowercase.
Equivalent to str.lower.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series with lowercase. | 
lstrip
lstrip() -> bigframes.series.SeriesRemove leading characters.
Strip whitespaces (including newlines) or a set of specified characters
from each string in the Series/Index from left side.
Replaces any non-strings in Series with NaNs.
Equivalent to str.lstrip.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series without leading characters. | 
match
match(pat, case=True, flags=0) -> bigframes.series.SeriesDetermine if each string starts with a match of a regular expression.
| Parameters | |
|---|---|
| Name | Description | 
pat | 
        
          str
          Character sequence or regular expression.  | 
      
case | 
        
          bool
          If True, case sensitive.  | 
      
flags | 
        
          int, default 0
          Regex module flags, e.g. re.IGNORECASE.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series of boolean values | 
pad
pad(width, side="left", fillchar=" ") -> bigframes.series.SeriesPad strings in the Series/Index up to width.
| Parameters | |
|---|---|
| Name | Description | 
width | 
        
          int
          Minimum width of resulting string; additional characters will be filled with character defined in   | 
      
side | 
        
          {'left', 'right', 'both'}, default 'left'
          Side from which to fill resulting string.  | 
      
fillchar | 
        
          str, default ' '
          Additional character for filling, default is whitespace.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Returns Series or Index with minimum number of char in object. | 
repeat
repeat(repeats: int) -> bigframes.series.SeriesDuplicate each string in the Series or Index.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series or Index of repeated string objects specified by input parameter repeats. | 
replace
replace(
    pat: typing.Union[str, re.Pattern],
    repl: str,
    *,
    case: typing.Optional[bool] = None,
    flags: int = 0,
    regex: bool = False
) -> bigframes.series.SeriesReplace each occurrence of pattern/regex in the Series/Index.
Equivalent to str.replace or re.sub, depending on
the regex value.
| Parameters | |
|---|---|
| Name | Description | 
pat | 
        
          str, re.Pattern
          String can be a character sequence or regular expression.  | 
      
repl | 
        
          str
          Replacement string.  | 
      
case | 
        
          default None
          Determines if replace is case sensitive: - If True, case sensitive (the default if   | 
      
flags | 
        
          int, default 0
          Regex module flags, e.g. re.IGNORECASE. Cannot be set if   | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        A copy of the object with all matching occurrences of pat replaced by repl. | 
      
reverse
reverse() -> bigframes.series.SeriesReverse strings in the Series.
rjust
rjust(width, fillchar=" ") -> bigframes.series.SeriesPad left side of strings in the Series/Index up to width.
| Parameters | |
|---|---|
| Name | Description | 
width | 
        
          int
          Minimum width of resulting string; additional characters will be filled with character defined in   | 
      
fillchar | 
        
          str, default ' '
          Additional character for filling, default is whitespace.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Returns Series or Index with minimum number of char in object. | 
rstrip
rstrip() -> bigframes.series.SeriesRemove trailing characters.
Strip whitespaces (including newlines) or a set of specified characters
from each string in the Series/Index from right side.
Replaces any non-strings in Series with NaNs.
Equivalent to str.rstrip.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series without trailing characters. | 
slice
slice(
    start: typing.Optional[int] = None, stop: typing.Optional[int] = None
) -> bigframes.series.SeriesSlice substrings from each element in the Series or Index.
| Parameters | |
|---|---|
| Name | Description | 
start | 
        
          int, optional
          Start position for slice operation.  | 
      
stop | 
        
          int, optional
          Stop position for slice operation.  | 
      
step | 
        
          int, optional
          Step size for slice operation.  | 
      
startswith
startswith(pat: typing.Union[str, tuple[str, ...]]) -> bigframes.series.SeriesTest if the start of each string element matches a pattern.
| Parameter | |
|---|---|
| Name | Description | 
pat | 
        
          str, tuple[str, ...]
          Character sequence or tuple of strings. Regular expressions are not accepted.  | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        A Series of booleans indicating whether the given pattern matches the start of each string element. | 
strip
strip() -> bigframes.series.SeriesRemove leading and trailing characters.
Strip whitespaces (including newlines) or a set of specified characters
from each string in the Series/Index from left and right sides.
Replaces any non-strings in Series with NaNs.
Equivalent to str.strip.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series or Index without leading and trailing characters. | 
upper
upper() -> bigframes.series.SeriesConvert strings in the Series/Index to uppercase.
Equivalent to str.upper.
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series with uppercase strings. | 
zfill
zfill(width: int) -> bigframes.series.SeriesPad strings in the Series/Index by prepending '0' characters.
Strings in the Series/Index are padded with '0' characters on the
left of the string to reach a total string length  width. Strings
in the Series/Index with length greater or equal to width are
unchanged.
| Parameter | |
|---|---|
| Name | Description | 
width | 
        
          int
          Minimum length of resulting string; strings with length less than   | 
      
| Returns | |
|---|---|
| Type | Description | 
bigframes.series.Series | 
        Series of objects. |