# -*- coding: utf-8 -*- """ Created on Fri Feb 17 15:08:37 2017 @author: yunjinqi E-mail:yunjinqi@qq.com Differentiate yourself in the world from anyone else. """ import pandas as pd from scipy import stats df=pd.read_csv('C:/Users/Administrator/exam0203.csv') df type(df) x=df.iloc[::,3] y=df.iloc[::,4] beta, alpha, r_value, p_value, std_err=stats.linregress(x,y) beta alpha r_value#r_squre=r_value*r_value p_value
R语言和Python回归结果是相同的,但是Python的界面很不好看,在统计上,Python还是需要进一步努力