crandas.stateobject

class crandas.stateobject.DeferredObject(*args, cls, **kwargs)

Bases: StateObject, Deferred

Deferred VDL object

Represents a deferred VDL object that has a name but for which no further structure can be used.

See transactions.

class crandas.stateobject.StateObject(handle, transaction_index=None, root_transaction=None, name=None, created=None, **kwargs)

Bases: ABC

Base class for VDL state objects.

A VDL state object is an object that is stored remotely in the VDL and on which operations can be performed, such as a CDataFrame.

property reference

Obtain a JSON-serializable reference to the object.

remove(**query_args)

Remove object from server

Parameters:

query_args (query arguments) – See query_args

crandas.stateobject.get_upload_handles(get_from=None)

Get list of handles of all objects uploaded to the VDL.

See crandas.stateobject.list_uploads() for an overview of which objects are considerd to be “uploaded”

Parameters:

get_from (str, optional) – If set to “mem”, only return objects that are in the working memory of the VDL server. If set to “disk”, only return objects that are not in the working memory. (The latter causes the objects to be loaded into memory at the server.)

crandas.stateobject.list_uploads(*, also_on_disk=False)

Get list of all objects uploaded to the VDL.

“Uploaded” objects are the results of functions that upload a local dataframe to the VDL, e.g., crandas.crandas.upload_pandas_dataframe(), crandas.crandas.DataFrame(), and crandas.crandas.read_csv(). It does not include tables that are computed from other tables or created via crandas.crandas.demo_table().

By default, for objects that are stored on-disk at the server, the metadata and creation date are not given. See the also_on_disk parameter below.

Parameters:

also_on_disk (bool, default: False) – If set to False, objects that need to be retrieved from disk at the server are listed, but their type and creation date are not returned. If set to True, these objects are loaded into memory and their metadata is returned.

Returns:

Dataframe containing handles, creation date, and type information

Return type:

pd.DataFrame