Skip to content

Remove boxplot from _dataframe_apply_whitelist #17381

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

Merged
merged 2 commits into from
Aug 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions pandas/core/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
import pandas.core.common as com
from pandas.core.config import option_context

from pandas.plotting._core import boxplot_frame_groupby

from pandas._libs import lib, groupby as libgroupby, Timestamp, NaT, iNaT
from pandas._libs.lib import count_level_2d

Expand Down Expand Up @@ -168,8 +170,9 @@
{'nlargest', 'nsmallest'}) -
{'boxplot'}) | frozenset(['dtype', 'unique'])

_dataframe_apply_whitelist = (_common_apply_whitelist |
frozenset(['dtypes', 'corrwith']))
_dataframe_apply_whitelist = ((_common_apply_whitelist |
frozenset(['dtypes', 'corrwith'])) -
{'boxplot'})

_cython_transforms = frozenset(['cumprod', 'cumsum', 'shift',
'cummin', 'cummax'])
Expand Down Expand Up @@ -4280,9 +4283,7 @@ def groupby_series(obj, col=None):
results.index = _default_index(len(results))
return results


from pandas.plotting._core import boxplot_frame_groupby # noqa
DataFrameGroupBy.boxplot = boxplot_frame_groupby
boxplot = boxplot_frame_groupby


class PanelGroupBy(NDFrameGroupBy):
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/groupby/test_whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
'pct_change',
'skew',
'plot',
'boxplot',
'hist',
'median',
'dtypes',
Expand Down