From 67504f0587e682cc609fe5cbb0eb75c067fbb561 Mon Sep 17 00:00:00 2001 From: GlebMorgan Date: Wed, 30 Mar 2022 18:26:22 +0300 Subject: [PATCH] Make pandas.NA JSON-serializable --- packages/python/plotly/_plotly_utils/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/python/plotly/_plotly_utils/utils.py b/packages/python/plotly/_plotly_utils/utils.py index 9254b7f23d2..2da71dda0d1 100644 --- a/packages/python/plotly/_plotly_utils/utils.py +++ b/packages/python/plotly/_plotly_utils/utils.py @@ -174,6 +174,8 @@ def encode_as_pandas(obj): if obj is pandas.NaT: return None + if obj is pandas.NA: + return None else: raise NotEncodable