Skip to content

Dataset Version Representation

DatasetVersionRepresentation

Represents the metadata of a Vectice dataset version.

A Dataset Version Representation shows information about a specific version of a dataset from the Vectice app. It makes it easier to get and read this information through the API.

Hint

A dataset version ID starts with 'DTV-XXX'. Retrieve the ID in the Vectice App, then use the ID with the following methods to get the dataset version: connect.dataset_version('DTV-XXX') or connect.browse('DTV-XXX') (see Connection page).

Attributes:

Name Type Description
id str

The unique identifier of the dataset version.

project_id str

The identifier of the project to which the dataset version belongs.

name str

The name of the dataset version. For dataset versions it corresponds to the version number.

description str

The description of the dataset version.

properties List[Dict[str, Any]]

The properties associated with the dataset version.

resources List[Dict[str, Any]]

The resources summary with the type, number of files and aggregated total number of columns for each resource inside the dataset version.

dataset_representation DatasetRepresentation

Holds informations about the source dataset linked to the dataset version, where all versions are grouped together.

asdict

asdict()

Transform the DatasetVersionRepresentation into a organised dictionary.

Returns:

Type Description
Dict[str, Any]

The object represented as a dictionary

properties_as_dataframe

properties_as_dataframe()

Transforms the properties of the DatasetVersionRepresentation into a DataFrame for better readability.

Returns:

Type Description
DataFrame

A pandas DataFrame containing the properties of the dataset version.

resources_as_dataframe

resources_as_dataframe()

Transforms the resources of the DatasetVersionRepresentation into a DataFrame for better readability.

Returns:

Type Description
DataFrame

A pandas DataFrame containing the resources of the dataset version.

update

update(
    properties=None,
    attachments=None,
    columns_description=None,
)

Update the Dataset Version from the API.

Parameters:

Name Type Description Default
properties dict[str, str | int] | list[Property] | Property | None

The new properties of the dataset.

None
attachments str | list[str] | None

The new attachments of the dataset.

None
columns_description dict[str, str] | str | None

A dictionary or path to a csv file to map the column's name to a specific description. Should follow the format { "column_name": "Description", ... }

None

Returns:

Type Description
None

None