[英]the error message of reading a large size csv file using datatable
我有以下代碼腳本來打開csv file
:
import datatable as dt
file_path=os.path.join(root_path, "train.csv")
print('file_path is ',file_path)
dt.fread(file_path)
運行此代碼時,會出現以下錯誤。
file_path is D:\.kaggle\data\janestreet\train.csv
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-29-1c38daf7b1ed> in <module>
2 file_path=os.path.join(root_path, "train.csv")
3 print('file_path is ',file_path)
----> 4 dt.fread(file_path)
IOError: Unable to obtain size of D:.kaggledatajanestreettrain.csv: [errno 132] value too large
我認為您可以使用 Pandas
import pandas as pd
df = pd.read_csv(csv_file_path)
print(df)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.