I want to save my Print results to my desktop.

Asked 1 years ago, Updated 1 years ago, 251 views

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**

python excel

2023-02-20 14:00

1 Answers

You can save it as a CSV file in p_value.to_csv('ret.csv').


2023-02-20 16:56

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.