w3resource
Pandas Tutorial

Pandas Series: dot() function

Compute the dot product between the Series and the columns in Pandas

The dot() function is used to 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.

Syntax:

Series.dot(self, other)

Parameters:

Name Description Type/Default Value Required / Optional
other The other object to compute the dot product with its columns. Series, DataFrame or array-like Required

Returns: scalar, Series or numpy.ndarray
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.

Notes:

The Series and other has to share the same index if other is a Series or a DataFrame.

Example:


Download the above Notebook from here.