-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
groupby boxplot doesn't work if multiple by's are used #14701
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
Comments
Thx for the report. Current impl doesn't care multilevel group cases. PR is appreciated. |
Groupby boxplot is not working even when a single 'by' is used
Problem description This code fails with an obscure error message from the internals: ~/.local/lib/python3.7/site-packages/pandas/plotting/_core.py in boxplot_frame(self, column, by, ax, fontsize, rot, grid, figsize, layout, return_type, backend, **kwargs) ~/.local/lib/python3.7/site-packages/pandas/plotting/_matplotlib/boxplot.py in boxplot_frame(self, column, by, ax, fontsize, rot, grid, figsize, layout, return_type, **kwds) ~/.local/lib/python3.7/site-packages/pandas/plotting/_matplotlib/boxplot.py in boxplot(data, column, by, ax, fontsize, rot, grid, figsize, layout, return_type, **kwds) ~/.local/lib/python3.7/site-packages/pandas/plotting/_matplotlib/boxplot.py in _grouped_plot_by_column(plotf, data, columns, by, numeric_only, grid, figsize, ax, layout, return_type, **kwargs) ~/.local/lib/python3.7/site-packages/pandas/plotting/_matplotlib/boxplot.py in plot_group(keys, values, ax) ~/anaconda3/lib/python3.7/site-packages/matplotlib/axes/_base.py in wrapper(self, *args, **kwargs) ~/anaconda3/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py in wrapper(*args, **kwargs) ~/anaconda3/lib/python3.7/site-packages/matplotlib/axis.py in _set_ticklabels(self, labels, fontdict, minor, **kwargs) ~/anaconda3/lib/python3.7/site-packages/matplotlib/axis.py in set_ticklabels(self, ticklabels, minor, **kwargs) ValueError: The number of FixedLocator locations (4), usually from a call to set_ticks, does not match the number of ticklabels (2). Expected Output It should just print a boxplot for all groups. Output of pd.show_versions() INSTALLED VERSIONS commit : None pandas : 1.0.5 |
Code Sample, a copy-pastable example if possible
Problem description
This code fails with an obscure error message from the internals:
There is no hint in the documentation that this could be an illegal operation.
Expected Output
It should just print a boxplot for all groups, or if this really doesn't work, give a real hint why.
Output of
pd.show_versions()
pandas: 0.19.0
nose: None
pip: 8.1.2
setuptools: 27.2.0
Cython: None
numpy: 1.11.2
scipy: 0.18.1
statsmodels: None
xarray: None
IPython: 5.1.0
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.7
blosc: None
bottleneck: None
tables: 3.3.0
numexpr: 2.6.1
matplotlib: 1.5.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: