bigframes.bigquery.array_length#
- bigframes.bigquery.array_length(series: Series) Series[source]#
Compute the length of each array element in the Series.
Examples:
>>> import bigframes.pandas as bpd >>> import bigframes.bigquery as bbq
>>> s = bpd.Series([[1, 2, 8, 3], [], [3, 4]]) >>> bbq.array_length(s) 0 4 1 0 2 2 dtype: Int64
You can also apply this function directly to Series.
>>> s.apply(bbq.array_length, by_row=False) 0 4 1 0 2 2 dtype: Int64
- Parameters:
series (bigframes.series.Series) – A Series with array columns.
- Returns:
- A Series of integer values indicating
the length of each element in the Series.
- Return type: