Python 2.7 - statsmodels - formatting and writing summary output

后端 未结 5 1729
独厮守ぢ
独厮守ぢ 2021-02-05 20:55

I\'m doing logistic regression using pandas 0.11.0(data handling) and statsmodels 0.4.3 to do the actual regression, on Mac OSX Lion.

I\'m goin

5条回答
  •  北恋
    北恋 (楼主)
    2021-02-05 21:28

    write_path = '/my/path/here/output.csv'
    with open(write_path, 'w') as f:
        f.write(result.summary().as_csv())
    

提交回复
热议问题