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

Commit 63f9954

Browse files
Update connector.py
1 parent a09574b commit 63f9954

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

labelpandas/connector.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,10 @@ def create_upload_dict(df:pandas.core.frame.DataFrame, lb_client:Client, base_cl
3030
global_key_to_upload_dict = {}
3131
futures = []
3232
with ThreadPoolExecutor() as exc:
33+
for index, row in df.iterrows():
34+
futures.append(exc.submit(create_data_rows, lb_client, base_client, row, metadata_name_key_to_schema, metadata_schema_to_name_key, row_data_col, global_key_col, external_id_col, metadata_index, local_files, divider))
3335
if verbose:
34-
print(f'Processing data rows...')
35-
for index, row in tqdm(df.iterrows()):
36-
futures.append(exc.submit(create_data_rows, lb_client, base_client, row, metadata_name_key_to_schema, metadata_schema_to_name_key, row_data_col, global_key_col, external_id_col, metadata_index, local_files, divider))
37-
else:
38-
for index, row in df.iterrows():
39-
futures.append(exc.submit(create_data_rows, lb_client, base_client, row, metadata_name_key_to_schema, metadata_schema_to_name_key, row_data_col, global_key_col, external_id_col, metadata_index, local_files, divider))
40-
if verbose:
41-
print(f'Formatting data rows...')
36+
print(f'Processing data rows...')
4237
for f in tqdm(as_completed(futures)):
4338
res = f.result()
4439
global_key_to_upload_dict[str(res["global_key"])] = res

0 commit comments

Comments
 (0)