[ Web Proxy ]
URL:
Viewing: https://dataframes.bigquery.dev/reference/api/../api/bigframes.pandas.DataFrame.corr.html [Back]  [Original]

bigframes.pandas.DataFrame.corr — bigframes documentation
Back to top
Search the docs ...:

bigframes.pandas.DataFrame.corr#

DataFrame.corr(method='pearson', min_periods=None, numeric_only=False) DataFrame[source]#

Compute pairwise correlation of columns, excluding NA/null values.

Examples:

>>> df = bpd.DataFrame({'A': [1, 2, 3],
...                    'B': [400, 500, 600],
...                    'C': [0.8, 0.4, 0.9]})
>>> df.corr(numeric_only=True)
          A         B         C
A       1.0       1.0  0.188982
B       1.0       1.0  0.188982
C  0.188982  0.188982       1.0

[3 rows x 3 columns]
Parameters:
  • method (string, default "pearson") Correlation method to use - currently only pearson is supported.

  • min_periods (int, default None) The minimum number of observations needed to return a result. Non-default values are not yet supported, so a result will be returned for at least two observations.

  • numeric_only (bool, default False) Include only float, int, boolean, decimal data.

Returns:

Correlation matrix.

Return type:

bigframes.pandas.DataFrame


Web Proxy Viewer  |  New URL  |  Original Page