pythoncompressiongzipgraphlabsframe

graphlab: How to load a gzipped file into SFrame


I would like to read a gzipped csv file () to SFrame provided by GraphLab. 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'))

Solution

  • You don't need the gzip.open part. SFrame detects that automatically.