import pandas as pd
df = pd.read_csv("PSD online data1.csv", thousands=',')
from scipy.stats import pearsonr
from scipy.stats import spearmanr
df.corr()
import pandas aspd
from scipy import stats
stats.pearsonr(x,y)
p_value=df.corr(method=lambdax, y:pearsonr(x,y)[0])
print(p_value)
**I would like to save the printed results here to a file on my computer**
You can save it as a CSV file in p_value.to_csv('ret.csv')
.
© 2025 OneMinuteCode. All rights reserved.