Closed
Description
Reproduce the issue:
- Install the orjson library.
- Execute the following code:
import pandas as pd
from plotly.io.json import to_json_plotly
to_json_plotly(pd.NA)
An error occurs when running the code:
Traceback (most recent call last):
File "/opt/conda/envs/dev/lib/python3.10/site-packages/plotly/io/_json.py", line 171, in to_json_plotly
return _safe(orjson.dumps(cleaned, option=opts).decode("utf8"), _swap_orjson)
TypeError: Type is not JSON serializable: NAType