bigframes.bigquery.array_to_string#

bigframes.bigquery.array_to_string(series: Series | Expression | Any | Literal[Sentinel.ARGUMENT_DEFAULT], delimiter: Series | Expression | Literal[Sentinel.ARGUMENT_DEFAULT] | bytes | str, null_text: Series | Expression | Literal[Sentinel.ARGUMENT_DEFAULT] | bytes | str = Sentinel.ARGUMENT_DEFAULT) Series | Expression[source]#

Converts array elements within a Series into delimited strings.

Examples:

>>> import bigframes.pandas as bpd
>>> import bigframes.bigquery as bbq
>>> s = bpd.Series([["H", "i", "!"], ["Hello", "World"], np.nan, [], ["Hi"]])
>>> bbq.array_to_string(s, delimiter=", ")
0         H, i, !
1    Hello, World
2
3
4              Hi
dtype: string
Parameters:
  • series (bigframes.series.Series) – A Series containing arrays.

  • delimiter (str) – The string used to separate array elements.

  • null_text (str, optional) – The string to replace any NULL values in the array with.

Returns:

A Series containing delimited strings.

Return type:

bigframes.series.Series