| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.bigquery.array_to_string.html | [Back] [Original] |
Section Navigation
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
You can call this function using the Series bigquery accessor.
>>> s.bigquery.array_to_string(delimiter=", ")
0 H, i, !
1 Hello, World
2
3
4 Hi
dtype: string
You can also use this accessor on a pandas Series after importing bigframes.
>>> import bigframes
>>> import pandas as pd
>>> ps = pd.Series([["H", "i", "!"], ["Hello", "World"], None, [], ["Hi"]])
>>> ps.bigquery.array_to_string(delimiter=", ")
0 H, i, !
1 Hello, World
2
3
4 Hi
dtype: string
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.
A Series containing delimited 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 |