Skip to content

Make pandas.NA JSON-serializable #3649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

GlebMorgan
Copy link

When plotting mapbox from pandas dataframe, if hover_data contains pandas.NA values, it throws Object of type NAType is not JSON serializable error. However for datetime64 objects it handles pandas.NaT values fine. I consider these cases to be similar and propose to make NA objects serializable the same way.

@nicolaskruchten
Copy link
Contributor

Thanks for this! Do you know which version of pandas introduced pandas.NA? Should we check for its existence before trying to access it?

@nicolaskruchten
Copy link
Contributor

Thanks for the push on this, I've merged #3705 which takes care of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants