bigframes.geopandas.GeoSeries.combine#

GeoSeries.combine(other, func) Series#

Combine the Series with a Series or scalar according to func.

Combine the Series and other using func to perform elementwise selection for combined Series. fill_value is assumed when value is missing at some index from one of the two objects being combined.

Examples:

Consider 2 Datasets s1 and s2 containing highest clocked speeds of different birds.

>>> import bigframes.pandas as bpd
>>> s1 = bpd.Series({'falcon': 330.0, 'eagle': 160.0})
>>> s1
falcon    330.0
eagle     160.0
dtype: Float64
>>> s2 = bpd.Series({'falcon': 345.0, 'eagle': 200.0, 'duck': 30.0})
>>> s2
falcon    345.0
eagle     200.0
duck       30.0
dtype: Float64

Now, to combine the two datasets and view the highest speeds of the birds across the two datasets

>>> s1.combine(s2, np.maximum)
falcon    345.0
eagle     200.0
duck       <NA>
dtype: Float64
Parameters:
  • other (Series or scalar) – The value(s) to be combined with the Series.

  • func (function) – BigFrames DataFrames remote_function to apply. Takes two scalars as inputs and returns an element. Also accepts some numpy binary functions.

Returns:

The result of combining the Series with the other object.

Return type:

bigframes.pandas.Series