皮尔森相关系数python

import pandas as pd
import numpy as np
from scipy.stats import pearsonr

dataset= pd.read_excel(r"D:\alldata\pythonfiles\九寨沟\数据\百度指数数据\九寨沟-百度-数据.xlsx")
x=dataset['客流量']
y=dataset['九寨沟旅游']
pccs = pearsonr(x, y)
print(pccs)

你可能感兴趣的:(python)