Skip to main content

Open in Colab

GitHub

Data rows are the assets that are being labeled; a data row cannot exist without belonging to a dataset. Data rows are added to a labeling task by uploading them to datasets and then creating project batches.

Client

Get a data row

Assign global keys

Clear global keys

Fundamentals

Create data rows

Data rows are created via methods from the Dataset class. For complete details and additional examples of approaches for creating data rows, please see Dataset. We recommend using created_data_rows() and upsert_data_rows() methods for large data row upload operations.
Special character handlingPlease note that certain characters like #,<, > and || are not supported in URLs and should be avoided in your file names to prevent loading issues.Please refer to https://datatracker.ietf.org/doc/html/rfc2396#section-2.4.3 on URI standards.A good test for the handling of special characters is to test URLs in your browser address bar — if the URL doesn’t load properly in your browser, it won’t load in Labelbox.
The only required argument when creating a data row is the row_data. However, Labelbox strongly recommends supplying each data row with a global key upon creation.

Export data rows

For a complete reference on how to export data rows, please visit the export overview documentation Export a single data row:

Methods

Create and update an attachment

Please reference our attachment documentation for more information on supported attachment data types. For details on creating attachments in the same step as creating data rows, see Dataset.

Get the winning label ID

For more details on what a “winning” label is and how it is chosen, see Consensus.

Update data rows from a dataset

We recommend using theupsert_data_rows() method to update data rows. When using this method to update data rows, you need to pass a key, which can reference either a global key or data row ID. Include any fields you wish to update along with their new values.
The update method is also available; however, for a large number of data row updates, we recommend using upsert_data_rows() The update method only supports updates on global_key, row_data or external_id values.

Delete data rows

Deleting data rows cannot be undoneThese methods delete data rows along with all labels made on each data row. This action cannot be reverted without the assistance of Labelbox support.

Limit on bulk deleting data rows

The lb.DataRow.bulk_delete() method can delete a maximum of 4,000 data rows per call.

Attributes

Get the basics

Get the attachments

Get the metadata

Get the labels