Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
odo 文档非常稀疏,它没有解释如何在加载 csv 文件时传递更多参数。例如,我如何告诉 odo 该文件是 latin1 编码的?
data=[] odo('mylatin1.csv',data)
尝试使用encoding关键字参数:
encoding
data = [] odo('mylatin1.csv', data, encoding='latin1')
或者,尝试使用以下方式指定编码odo.resource:
odo.resource
from odo import resource my_csv = resource('mylatin1.csv', encoding='latin1') data = [] odo(my_csv, data)