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

Commit 3a50c0b

Browse files
Luke MoehlenbrockLuke Moehlenbrock
authored andcommitted
added check for NaN values from pd dataframe
1 parent 42b39ef commit 3a50c0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

labelpandas/uploader.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ def create_upload(row_dict:dict, row_data_col:str, global_key_col:str, external_
186186
"predictions" : [] -- List of predictions for a given data row, if applicable
187187
}
188188
"""
189+
#Remove nan values from dictionary
190+
for key in row_dict.keys():
191+
if pandas.isna(row_dict[key]):
192+
del row_dict[key]
189193
# Determine dataset ID
190194
if dataset_id:
191195
datasetId = dataset_id

0 commit comments

Comments
 (0)