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

Commit 7e18786

Browse files
Update connector.py
1 parent 6a21eea commit 7e18786

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

labelpandas/connector.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ 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(
35-
exc.submit(
36-
create_data_rows, lb_client, base_client, row,
37-
metadata_name_key_to_schema, metadata_schema_to_name_key, row_data_col,
38-
global_key_col, external_id_col, metadata_index, local_files, divider
39-
)
40-
)
4133
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...')
4242
for f in tqdm(as_completed(futures)):
4343
res = f.result()
4444
global_key_to_upload_dict[str(res["global_key"])] = res

0 commit comments

Comments
 (0)