pandas.api.typing.SeriesGroupBy.corr
pandas 3.1.1 · GroupBy · method
Calculate correlation coefficients between numeric inputs. A DataFrame can produce a column-by-column matrix.
Call syntax
pd.api.typing.SeriesGroupBy.corr(other, method='pearson', min_periods=None)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
other |
Required Positional or keyword |
Series Supply the second object or value used in the operation. |
method |
Optional Positional or keyword Default 'pearson' |
{'pearson', 'kendall', 'spearman'} Choose the algorithm used to calculate, align, or fill the result. |
min_periods |
Optional Positional or keyword Default None |
int Require this many valid observations in a window before pandas reports a value. |
Returns
Series