Collection

class mangrove_surface.wrapper.collection.CollectionWrapper

Collection

A collection is a set of dataset schemas which are similars.

create_schema(type_schm, schema, name=None, check=True)

Create a new schema into the current collection

Parameters:
  • type_schmtrain, test or export
  • schema – a python dictionary recording datasets like this
{
    "tags": ["dataset", "tag"],
    "datasets": [
        {
            "name": "Dataset Name",
            "filepath": "/path/to/dataset.csv",
            "tags": ["optional", "tags"],
            "central": True | False,
            "keys: ["index"], # optional if there is only
                              # one dataset
            "separator": ",", # could be `|`, `,`, `;` or ` `
        }, ...
    ]
}
schema(name)

Return schema named name

Parameters:name – the name of the requested schema
schemas()

List all schemas of the current collection