dot(self, 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 :None:None:`self @ other`
in Python >= 3.5.
The Series and other has to share the same index if other is a Series or a DataFrame.
The other object to compute the dot product with its columns.
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.
Compute the dot product between the Series and the columns of other.
DataFrame.dot
Compute the matrix product with the DataFrame.
Series.mul
Multiplication of series and other, element-wise.
>>> s = pd.Series([0, 1, 2, 3])This example is valid syntax, but we were not able to check execution
... other = pd.Series([-1, 2, -3, 4])
... s.dot(other) 8
>>> s @ other 8This example is valid syntax, but we were not able to check execution
>>> df = pd.DataFrame([[0, 1], [-2, 3], [4, -5], [6, 7]])This example is valid syntax, but we were not able to check execution
... s.dot(df) 0 24 1 14 dtype: int64
>>> arr = np.array([[0, 1], [-2, 3], [4, -5], [6, 7]])See :
... s.dot(arr) array([24, 14])
The following pages refer to to this document either explicitly or contain code examples using this.
pandas.core.frame.DataFrame.dot
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them