202107-01 python 如何把classification_report输出到csv文件 今天想把classification_report的统计结果输出到文件中,我这里分享一下一个简洁的方式:我的pandas版本:pandas1.0.3代码:fromsklearn.metricsimportclassification_reportreport=classification_report(y_test,y_pred,output_dict=True)df=pd.DataFrame(report).transpose()df.to_csv("result.csv",index=True)是不是很简单,下面是我导出来的一个结果:补充:sklearnclassification_report输出说明... 继续阅读 >