Create a Dataset SDK
  • Print
  • Share
  • Dark
    Light

Create a Dataset SDK

  • Print
  • Share
  • Dark
    Light

To reach the datasets repository press here

To reach the datasets entity press here

Highlighted text require your input

Prep

import dtlpy as dl
if dl.token_expired():
    dl.login()
project = dl.projects.get(project_name='my-project-name')

Create a Dataset

dataset = project.datasets.create(dataset_name='my-dataset-name')

Get Commands

Get Project's Datasets List

datasets = project.datasets.list()

Get Dataset by Name

dataset = project.datasets.get(dataset_name='my-dataset-name')

Get a dataset by ID

dataset = project.datasets.get(dataset_id='my-dataset-id')

Print a Dataset

dataset.print()

Output:

+----+--------------------------+---------------+-------------+-----------------------+------------------------------------------+--------------+
|    | id                       | name          |   annotated | creator               | projects                                 |   itemsCount |
|----+--------------------------+---------------+-------------+-----------------------+------------------------------------------+--------------|
|  0 | 5d4183239e92cf4a0af8b20a | b'My_Dataset' |           0 | oa-test-1@dataloop.ai | ['023a227a-7343-45a4-a657-2c3b49785c0a'] |            0 |
+----+--------------------------+---------------+-------------+-----------------------+------------------------------------------+--------------+
Was This Article Helpful?