We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from pandas.api.types import CategoricalDtype class_cat = CategoricalDtype( ordered=True, categories=['foo', 'bar'] + list(mpg['class'].unique()), )
Unused categories are incorrectly included with drop=True (the default):
drop=True
(mpg .astype({'class': 'str'}) .astype({'class': class_cat}) .pipe(ggplot) + geom_bar(aes(x='class')) + scale_x_discrete(drop=True) )
Same as drop=False:
drop=False
(mpg .astype({'class': 'str'}) .astype({'class': class_cat}) .pipe(ggplot) + geom_bar(aes(x='class')) + scale_x_discrete(drop=False) )
The text was updated successfully, but these errors were encountered:
9e52a25
Looks great, thanks!
(mpg .astype({'class': 'str'}) .astype({'class': class_cat}) .pipe(ggplot) + geom_bar(aes(x='class')) )
Sorry, something went wrong.
No branches or pull requests
Unused categories are incorrectly included with
drop=True
(the default):Same as
drop=False
:The text was updated successfully, but these errors were encountered: