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

Commit 7f07e74

Browse files
Update connector.py
1 parent fa30086 commit 7f07e74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

labelpandas/connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from concurrent.futures import ThreadPoolExecutor, as_completed
55

66
def create_upload_dict(df:pandas.core.frame.DataFrame, lb_client:Client, base_client:baseClient, row_data_col:str,
7-
global_key_col:str="", external_id_col:str="", metadata_index:dict={}, divider:str="///", verbose=False):
7+
global_key_col:str="", external_id_col:str="", metadata_index:dict={}, local_files:bool=False, divider:str="///", verbose=False):
88
""" Multithreads over a Pandas DataFrame, calling create_data_rows() on each row to return an upload dictionary
99
Args:
1010
df : Required (pandas.core.frame.DataFrame) - Pandas DataFrame
@@ -63,7 +63,7 @@ def create_data_rows(lb_client:Client, base_client:baseClient, row:pandas.core.s
6363
Returns:
6464
Two items - the global_key, and a dictionary with "row_data", "global_key", "external_id" and "metadata_fields" keys
6565
"""
66-
row_data = str(row[row_data_col]) if not local_files else base_client.connector.upload_local_file(lb_client, str(row[row_data_col]))
66+
row_data = str(row[row_data_col]) if not local_files else base_client.connector.upload_local_file(lb_client=lb_client, file_path=str(row[row_data_col]))
6767
metadata_fields = [{"schema_id" : metadata_name_key_to_schema['lb_integration_source'], "value" : "Pandas"}]
6868
if metadata_index:
6969
for metadata_field_name in metadata_index.keys():

0 commit comments

Comments
 (0)