Skip to content

Commit 8e0b07d

Browse files
committed
Float NaN values are invalid for json encoding; replace with None object
1 parent b91b44e commit 8e0b07d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sasctl/pzmm/write_json_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ def apply_dataframe_to_json(
10421042
values from the SAS CAS percentile action set added in.
10431043
"""
10441044
for row_num in range(len(stat_df)):
1045-
row_dict = stat_df.iloc[row_num].to_dict()
1045+
row_dict = stat_df.iloc[row_num].replace(float("nan"), None).to_dict()
10461046
json_dict[row_num + partition * len(stat_df)]["dataMap"].update(row_dict)
10471047
return json_dict
10481048

0 commit comments

Comments
 (0)