precision recall f1-score support
0 0.98 0.90 0.94 305
1 0.77 0.93 0.84 102
avg / total 0.92 0.91 0.91 407
Run Code Online (Sandbox Code Playgroud)
平均/总计是什么意思?以及它是如何计算的?在TAT官方网站上没有找到答案
这是我的代码:
import csv
file = open('traintag1.csv','r',encoding='utf-8')
csv_reader = csv.reader(file)
for row in csv_reader:
print row[-2]
Run Code Online (Sandbox Code Playgroud)
然后遇到类似标题的错误:
file = open('traintag1.csv','r',encoding ='utf-8')TypeError:“ encoding”是此函数的无效关键字参数”
我想使用'encoding ='utf-8',因为当文件装满中文时,在读取文件以在屏幕上打印后,单词是乱七八糟的。当我from io import open在头上添加另一条线时,再次出现如下错误:
UnicodeDecodeError:'utf8'编解码器无法解码位置29的字节0xbb:无效的起始字节