|
7 | 7 | from pandas.util.decorators import cache_readonly
|
8 | 8 | import pandas.core.common as com
|
9 | 9 | from pandas.core.index import Index, MultiIndex
|
10 |
| -from pandas.core.series import Series |
| 10 | +from pandas.core.series import Series, remove_na |
11 | 11 | from pandas.tseries.index import DatetimeIndex
|
12 | 12 | from pandas.tseries.period import PeriodIndex
|
13 | 13 | from pandas.tseries.frequencies import get_period_alias, get_base_alias
|
@@ -1007,7 +1007,7 @@ def boxplot(data, column=None, by=None, ax=None, fontsize=None,
|
1007 | 1007 | def plot_group(grouped, ax):
|
1008 | 1008 | keys, values = zip(*grouped)
|
1009 | 1009 | keys = [_stringify(x) for x in keys]
|
1010 |
| - ax.boxplot(values, **kwds) |
| 1010 | + ax.boxplot(remove_na(values), **kwds) |
1011 | 1011 | if kwds.get('vert', 1):
|
1012 | 1012 | ax.set_xticklabels(keys, rotation=rot, fontsize=fontsize)
|
1013 | 1013 | else:
|
@@ -1043,7 +1043,8 @@ def plot_group(grouped, ax):
|
1043 | 1043 |
|
1044 | 1044 | # Return boxplot dict in single plot case
|
1045 | 1045 |
|
1046 |
| - bp = ax.boxplot(list(data[cols].values.T), **kwds) |
| 1046 | + clean_values = [remove_na(x) for x in data[cols].values.T] |
| 1047 | + bp = ax.boxplot(clean_values, **kwds) |
1047 | 1048 | if kwds.get('vert', 1):
|
1048 | 1049 | ax.set_xticklabels(keys, rotation=rot, fontsize=fontsize)
|
1049 | 1050 | else:
|
|
0 commit comments