dataframely.deserialize_collection#

dataframely.deserialize_collection(data: str) type[Collection][source]#

Deserialize a collection from a JSON string.

This method allows to dynamically load a collection from its serialization, without having to know the collection to load in advance.

Parameters:

data – The JSON string created via Collection.serialize().

Returns:

The collection loaded from the JSON data.

Raises:

ValueError – If the schema format version is not supported.

Attention

The returned collection cannot be used to create instances of the collection as filters cannot be correctly recovered from the serialized format as of polars 1.31. Thus, you should only use static information from the returned collection.

Attention

This functionality is considered unstable. It may be changed at any time without it being considered a breaking change.

See also

Collection.serialize() for additional information on serialization.