Pandas DataFrame: dot() function
DataFrame - dot() function
The dot() function is used to compute the matrix multiplication between the DataFrame and other.Syntax:
|Name||Description||Type/Default Value||Required / Optional|
The other object to compute the matrix product with.
|Series, DataFrame or array-like||Required|
Returns: Series or DataFrame
If other is a Series, return the matrix product between self and other as a Serie. If other is a DataFrame or a numpy.array, return the matrix product of self and other in a DataFrame of a np.array.
The dimensions of DataFrame and other must be compatible in order to compute the matrix multiplication. In addition, the column names of DataFrame and the index of other must contain the same values, as they will be aligned prior to the multiplication.
The dot method for Series computes the inner product, instead of the matrix product here.
Download the above Notebook from here.
- New Content published on w3resource:
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework