Complete the code to calculate the correlation matrix of the DataFrame.
correlation_matrix = df.[1]()The corr() method calculates the correlation matrix between numerical columns in a DataFrame.
Complete the code to calculate the correlation between columns 'A' and 'B' in the DataFrame.
correlation = df['A'].[1](df['B'])
The corr() method can be used on a Series to find correlation with another Series.
Fix the error in the code to calculate correlation matrix correctly.
correlation_matrix = df.[1]The corr() method must be called with parentheses to execute and return the correlation matrix.
Fill both blanks to create a dictionary of correlations for columns with correlation greater than 0.5.
high_corr = {col: df['target'].[1](df[col]) for col in df.columns if df['target'].[2] col > 0.5}Use corr to calculate correlation and > to filter columns with correlation greater than 0.5.
Fill all three blanks to create a filtered DataFrame with columns having correlation above 0.7 with 'score'.
corr_matrix = df.[1]() high_corr_cols = [col for col in corr_matrix['score'] if corr_matrix['score'][col] [2] 0.7] filtered_df = df[[3]]
Calculate correlation matrix with corr(), filter columns with correlation greater than 0.7, and select those columns from the DataFrame.