📅  最后修改于: 2022-03-11 14:46:26.742000             🧑  作者: Mango
correlations = df_no_zeroes_revenue.corr().unstack().sort_values(ascending=False) # Build correlation matrix
correlations = pd.DataFrame(correlations).reset_index() # Convert to dataframe
correlations.columns = ['col1', 'col2', 'correlation'] # Label it
correlations[(corrlations.correlation) > 0.5 & (correlations.correlation < 1)] # to see the highest correlated variables