From b340f54de2c222b4c7e9bfd02b67fbe7eeaba329 Mon Sep 17 00:00:00 2001 From: nh916 Date: Mon, 14 Nov 2022 11:52:01 -0800 Subject: [PATCH] fixed the error for associate column within the material sheet. (#44) Essentially we are checking if the column is empty within pandas and if it is, then we use None instead of NaN because JSON can handle None and not NaN --- src/python/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/parse.py b/src/python/parse.py index 64e7fd7..1b7bc25 100644 --- a/src/python/parse.py +++ b/src/python/parse.py @@ -105,7 +105,7 @@ def _get_cell_info(self, index, row, column): "type": nested_types[-1], "unique_key": nested_keys[-1].strip("*"), "key": self._clean_key(nested_keys[-1]), - "value": row[column], + "value": row[column] if not pd.isna(row[column]) else None, "unit": column[2] if "Unnamed" not in column[2] else None, }