{}
run-icon
main.py
import pandas as pd # Creating a sample DataFrame df = pd.DataFrame({ 'Study_Hours': [1, 2, 3, 4, 5], 'Test_Scores': [50, 55, 70, 75, 90] }) # Covariance Matrix cov_matrix = df.cov() # Correlation Matrix corr_matrix = df.corr()
Output