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

Commit c952bdf

Browse files
Update connector.py
1 parent a50ac1d commit c952bdf

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

labelpandas/connector.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,17 @@ def create_upload_dict(table:pandas.core.frame.DataFrame, lb_client:Client, base
4040
futures = []
4141
if verbose:
4242
print(f'Submitting data rows...')
43-
for index, row in table.iterrows():
44-
futures.append(exc.submit(
45-
create_data_rows, lb_client, base_client, row, metadata_name_key_to_schema, metadata_schema_to_name_key,
46-
row_data_col, global_key_col, external_id_col, metadata_index, local_files, divider
47-
))
43+
for index, row in tqdm(table.iterrows()):
44+
futures.append(exc.submit(
45+
create_data_rows, lb_client, base_client, row, metadata_name_key_to_schema, metadata_schema_to_name_key,
46+
row_data_col, global_key_col, external_id_col, metadata_index, local_files, divider
47+
))
48+
else:
49+
for index, row in table.iterrows():
50+
futures.append(exc.submit(
51+
create_data_rows, lb_client, base_client, row, metadata_name_key_to_schema, metadata_schema_to_name_key,
52+
row_data_col, global_key_col, external_id_col, metadata_index, local_files, divider
53+
))
4854
if verbose:
4955
print(f'Processing data rows...')
5056
for f in tqdm(as_completed(futures)):

0 commit comments

Comments
 (0)