bigframes.pandas.DataFrame.corrwith#

DataFrame.corrwith(other:DataFrame|Series,*,numeric_only:bool=False)[source]#

Compute pairwise correlation.

Pairwise correlation is computed between rows or columns ofDataFrame with rows or columns of Series or DataFrame. DataFramesare first aligned along both axes before computing thecorrelations.

Examples:

>>>index=["a","b","c","d","e"]>>>columns=["one","two","three","four"]>>>df1=bpd.DataFrame(np.arange(20).reshape(5,4),index=index,columns=columns)>>>df2=bpd.DataFrame(np.arange(16).reshape(4,4),index=index[:4],columns=columns)>>>df1.corrwith(df2)one      1.0two      1.0three    1.0four     1.0dtype: Float64
Parameters:
  • other (DataFrame,Series) – Object with which to compute correlations.

  • numeric_only (bool,default False) – Include onlyfloat,int orboolean data.

Returns:

Pairwise correlations.

Return type:

bigframes.pandas.Series

This Page