turicreate.SFrame.save

SFrame.save(filename, format=None)

Save the SFrame to a file system for later use.

Parameters:
filename : string

The location to save the SFrame. Either a local directory or a remote URL. If the format is ‘binary’, a directory will be created at the location which will contain the sframe.

format : {‘binary’, ‘csv’, ‘json’}, optional

Format in which to save the SFrame. Binary saved SFrames can be loaded much faster and without any format conversion losses. If not given, will try to infer the format from filename given. If file name ends with ‘csv’ or ‘.csv.gz’, then save as ‘csv’ format, otherwise save as ‘binary’ format. See export_csv for more csv saving options.

See also

load_sframe, SFrame

Examples

>>> # Save the sframe into binary format
>>> sf.save('data/training_data_sframe')
>>> # Save the sframe into csv format
>>> sf.save('data/training_data.csv', format='csv')