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')
.
911 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
578 Understanding How to Configure Google API Key
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.