读取csv文件编码的方法
文章目录
with open(fpath, 'rb') as f:
result = chardet.detect(f.read())
e = result['encoding']
print(e) with open(fpath, 'rb') as f:
result = chardet.detect(f.read())
e = result['encoding']
print(e)
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论