bigframes.geopandas.GeoSeries.add#

GeoSeries.add(other: float | int | Timedelta | Series) Series#

Return addition of Series and other, element-wise (binary operator add).

Equivalent to series + other, but with support to substitute a fill_value for missing data in either one of the inputs.

Examples:

>>> a = bpd.Series([1, 2, 3, pd.NA])
>>> a
0       1
1       2
2       3
3    <NA>
dtype: Int64
>>> b = bpd.Series([10, 20, 30, 40])
>>> b
0     10
1     20
2     30
3     40
dtype: Int64
>>> a.add(b)
0      11
1      22
2      33
3    <NA>
dtype: Int64

You can also use the mathematical operator +:

>>> a + b
0      11
1      22
2      33
3    <NA>
dtype: Int64

Adding two Series with explicit indexes:

>>> a = bpd.Series([1, 2, 3, 4], index=['a', 'b', 'c', 'd'])
>>> b = bpd.Series([10, 20, 30, 40], index=['a', 'b', 'd', 'e'])
>>> a.add(b)
a      11
b      22
c    <NA>
d      34
e    <NA>
dtype: Int64
Parameters:

other (Series or scalar value)

Returns:

The result of the operation.

Return type:

bigframes.pandas.Series