我在用dask读取一个文件时出错,该文件适用于pandas:
import dask.dataframe as dd
import pandas as pd
pdf = pd.read_csv("./tous_les_docs.csv")
pdf.shape
(20140796, 7)
当达斯克给我一个错误:
^{pr2}$
回答:
添加“blocksize=None”使其有效:
df = dd.read_csv("./tous_les_docs.csv", blocksize=None)
Tags:
文件上说这可能发生
http://docs.dask.org/en/latest/dataframe-api.html#dask.dataframe.read_csv
Dask似乎通过行结束符将文件分块,但没有从一开始扫描整个文件,以查看行结束符是否在字符串中。在
相关问题 更多 >
编程相关推荐