在这段代码中,我试图读取csv文件并找到总通过和失败数,并且必须将第二个for循环段插入csv文件中
d=dfs[i]['Filename'].tolist()
total=len(dfs[i].IngestionStatus)
tpass=len(dfs[i][dfs[i]['IngestionStatus'] == 'Pass'])
tfail=total-tpass
print ("SNo\t\tName\t\tTotal\t\tTotalPass\t\tTotalFail")
print ("------------------------------------------------------------------------------------")
for j in range(1):
print ("%d:\t\t%s\t\t%d\t\t%d\t\t\t%d" % (j,d[j] ,total,tpass,tfail))
print ("------------------------------------------------------------------------------------")```
Need to convert this section of the code into a table and insert it into a csv file
目前没有回答
相关问题 更多 >
编程相关推荐