py_save_object: Save and Load Python Objects

View source: R/pickle.R

py_save_objectR Documentation

Save and Load Python Objects

Description

Save and load Python objects.

Usage

py_save_object(object, filename, pickle = "pickle", ...)

py_load_object(filename, pickle = "pickle", ...)

Arguments

object

A Python object.

filename

The output file name. Note that the file extension .pickle is considered the "standard" extension for serialized Python objects as created by the pickle module.

pickle

The "pickle" implementation to use. Defaults to "pickle", but other compatible Python "pickle" implementations (e.g. "cPickle") could be used as well.

...

Optional arguments, to be passed to the pickle module's dump() and load() functions.

Details

Python objects are serialized using the pickle module – see https://docs.python.org/3/library/pickle.html for more details.


reticulate documentation built on May 12, 2022, 1:05 a.m.