python自动生成统计表_在Python中生成统计表并导出到Ex

我想用Python生成用于出版物的高质量统计表。在

在Stata中,可以使用社区贡献的命令家族estout:sysuse auto, clear

regress mpg weight

estimates store A

regress mpg weight price

estimates store B

regress mpg weight price length

estimates store C

regress mpg weight price length displacement

estimates store D

esttab A B C D, se r2 nonumber mtitle("Model 1" "Model 2" "Model 3" "Model 4")

----------------------------------------------------------------------------

Model 1 Model 2 Model 3 Model 4

----------------------------------------------------------------------------

weight -0.00601*** -0.00582*** -0.00304 -0.00354

(0.000518) (0.000618) (0.00177) (0.00212)

price -0.0000935 -0.000173 -0.000174

(0.000163) (0.000168) (0.000169)

length -0.0966 -0.0947

(0.0577) (0.0582)

displacement 0.00433

(0.00983)

_cons 39.44*** 39.44*** 49.68*** 50.02***

(1.614) (1.622) (6.329) (6.410)

----------------------------------------------------------------------------

N 74 74 74 74

R-sq 0.652 0.653 0.666 0.667

----------------------------------------------------------------------------

Standard errors in parentheses

* p<0.05, ** p<0.01, *** p<0.001

如何在Python中运行多元回归并将信息汇总到一些漂亮的表中?在

我还想将这些导出到Excel中。在

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值