bigframes.pandas.Series.dot#
- Series.dot(other)[source]#
Compute the dot product between the Series and the columns of other.
This method computes the dot product between the Series and another one, or the Series and each columns of a DataFrame, or the Series and each columns of an array.
It can also be called using self @ other in Python >= 3.5.
Note
The Series and other has to share the same index if other is a Series or a DataFrame. BigQuery Dataframes does not validate this property and will produce incorrect results if indices are not equal.
Examples:
>>> s = bpd.Series([0, 1, 2, 3]) >>> other = bpd.Series([-1, 2, -3, 4]) >>> s.dot(other) np.int64(8)
You can also use the operator
@for the dot product:>>> s @ other np.int64(8)
- Parameters:
other (Series) – The other object to compute the dot product with its columns.
- Returns:
Return the dot product of the Series and other if other is a Series, the Series of the dot product of Series and each rows of other if other is a DataFrame or a numpy.ndarray between the Series and each columns of the numpy array.
- Return type:
scalar, bigframes.pandas.Series or numpy.ndarray