Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 249417b

Browse files
Update client.py
1 parent bf8bb4f commit 249417b

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

labelpandas/client.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Client():
1212
lb_client : labelbox.Client object
1313
base_client : labelbase.Client object
1414
Key Functions:
15-
create_data_rows_from_table : Creates Labelbox data rows (and metadata) given a Pandas DataFrame
15+
create_data_rows_from_table : Creates Labelbox data rows (and metadata) given a Pandas DataFrame an an existing Labelbox Dataset
1616
"""
1717
def __init__(
1818
self,
@@ -35,13 +35,18 @@ def create_data_rows_from_table(
3535
df : Required (pandas.core.frame.DataFrame) - Pandas DataFrame
3636
lb_dataset : Required (labelbox.schema.dataset.Dataset) - Labelbox dataset to add data rows to
3737
row_data_col : Required (str) - Column containing asset URL or file path
38-
local_files : Required (bool) - If True, will create urls for local files; if False, uploads `row_data_col` as urls
39-
global_key_col : Optional (str) - Column name containing the data row global key - defaults to row data
40-
external_id_col : Optional (str) - Column name containing the data row external ID - defaults to global key
41-
metadata_index : Required (dict) - Dictionary where {key=column_name : value=metadata_type} - metadata_type = "enum", "string", "datetime" or "number"
42-
skip_duplicates : Optional (bool) - If True, will skip duplicate global_keys, otherwise will generate a unique global_key with a suffix "_1", "_2" and so on
43-
verbose : Required (bool) - If True, prints information about code execution
44-
divider : Optional (str) - String delimiter for all name keys generated
38+
local_files : Required (bool) - Determines how to handle row_data_col values
39+
If True, treats row_data_col values as file paths uploads the local files to Labelbox
40+
If False, treats row_data_col values as urls (assuming delegated access is set up)
41+
global_key_col : Optional (str) - Column name containing the data row global key - defaults to row_data_col
42+
external_id_col : Optional (str) - Column name containing the data row external ID - defaults to global_key_col
43+
metadata_index : Required (dict) - Dictionary where {key=column_name : value=metadata_type}
44+
metadata_type must be either "enum", "string", "datetime" or "number"
45+
skip_duplicates : Optional (bool) - Determines how to handle if a global key to-be-uploaded is already in use
46+
If True, will skip duplicate global_keys and not upload them
47+
If False, will generate a unique global_key with a suffix "_1", "_2" and so on
48+
verbose : Required (bool) - If True, prints details about code execution; if False, prints minimal information
49+
divider : Optional (str) - String delimiter for all name keys generated for parent/child schemas
4550
Returns:
4651
A dictionary with "upload_results" and "conversion_errors" keys
4752
- "upload_results" key pertains to the results of the data row upload itself

0 commit comments

Comments
 (0)