简体   繁体   English

graphlab:如何将压缩文件加载到 SFrame

[英]graphlab: How to load a gzipped file into SFrame

I would like to read a gzipped csv file () to SFrame provided by GraphLab.我想读取一个 gzip 压缩的 csv 文件 () 到 GraphLab 提供的 SFrame。 https://dato.com/products/create/docs/generated/graphlab.SFrame.read_csv.html https://dato.com/products/create/docs/generated/graphlab.SFrame.read_csv.html

I tried the following code, but it did not work.我尝试了以下代码,但没有奏效。

import graphlab
import gzip
graphlab.SFrame.read_csv(gzip.open('file.csv.gz'))

You don't need the gzip.open part.您不需要gzip.open部分。 SFrame detects that automatically. SFrame 会自动检测。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM