Skip to content
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

Don't cast pandas.Categorical to object #2170

Closed
wants to merge 3 commits into from
Closed

Don't cast pandas.Categorical to object #2170

wants to merge 3 commits into from

Conversation

dsaxton
Copy link

@dsaxton dsaxton commented May 25, 2020

I think the pandas bug mentioned in this comment is fixed so it may be possible to skip the conversion to object entirely

#245 (comment)

@dsaxton dsaxton closed this Sep 22, 2020
@dsaxton dsaxton deleted the do-not-cast-categorical branch September 22, 2020 21:13
@RoyalTS
Copy link
Contributor

RoyalTS commented Dec 4, 2020

How come this PR was never merged? The pandas bug that's referenced in comment really does seem to have been fixed and recasting categories to object screws up e.g. ordering of axes.

@jakevdp
Copy link
Collaborator

jakevdp commented Dec 4, 2020

This was not merged because I was in the middle of an interstate move during a global pandemic and I ignored github for a while 😁

Can you confirm that this fixes any issue? JSON doesn't support categorical, so I don't think converting to string a different way will change how a chart orders items. Also, I'm not certain which pandas release has this fix, and it's useful to support older versions of dependencies unless breaking that support is absolutely necessary.

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.

3 participants