Dataset Representation
DatasetRepresentation ¶
Represents the metadata of a Vectice dataset.
A Dataset Representation shows information about a specific dataset from the Vectice app. It makes it easier to get and read this information through the API.
Hint
A dataset ID starts with 'DTS-XXX'. Retrieve the ID in the Vectice App, then use the ID with the following methods to get the dataset:
connect.dataset('DTS-XXX')
or connect.browse('DTS-XXX')
(see Connection page).
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The unique identifier of the dataset. |
project_id |
str
|
The identifier of the project to which the dataset belongs. |
name |
str
|
The name of the dataset. |
description |
str
|
The description of the dataset. |
type |
str
|
The type of the dataset. |
origin |
str
|
The source origin of the dataset. |
total_number_of_versions |
int
|
The total number of versions belonging to this dataset. |
asdict ¶
asdict()
list_versions ¶
list_versions(
number_of_items=DEFAULT_NUMBER_OF_ITEMS,
as_dataframe=False,
)
Retrieve the dataset versions list linked to the dataset. (Maximum of 100 versions).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
number_of_items
|
int
|
The number of versions to retrieve. Defaults to 30. |
DEFAULT_NUMBER_OF_ITEMS
|
as_dataframe
|
bool
|
If set to True, return type will be a pandas DataFrame for easier manipulation (requires pandas to be installed). If set to False, returns all dataset versions as a list of DatasetVersionRepresentation. |
False
|
Returns:
Type | Description |
---|---|
List[DatasetVersionRepresentation] | DataFrame
|
The dataset versions list as either a list of DatasetVersionRepresentation or a pandas DataFrame. |
versions_list ¶
versions_list(number_of_versions=30, as_dataframe=True)
Retrieve the dataset versions list linked to the dataset. (Maximum of 100 versions).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
number_of_versions
|
int
|
The number of versions to retrieve. Defaults to 30. |
30
|
as_dataframe
|
bool
|
If set to True, return type will be a pandas DataFrame for easier manipulation (requires pandas to be installed). If set to False, returns all dataset versions as a list of dictionaries. |
True
|
Returns:
Type | Description |
---|---|
List[Dict[str, Any]] | DataFrame
|
The dataset versions list as either a list of dictionaries or a pandas DataFrame. |