Skip to content
Merged
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: 10 additions & 1 deletion pandas/tests/plotting/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2650,11 +2650,20 @@ def test_pie_df(self):
self._check_colors(ax.patches, facecolors=color_args)

def test_pie_df_nan(self):
import matplotlib as mpl

df = DataFrame(np.random.rand(4, 4))
for i in range(4):
df.iloc[i, i] = np.nan
fig, axes = self.plt.subplots(ncols=4)
df.plot.pie(subplots=True, ax=axes, legend=True)

# GH 37668
kwargs = {}
if mpl.__version__ >= "3.3":
kwargs = {"normalize": True}

with tm.assert_produces_warning(None):
df.plot.pie(subplots=True, ax=axes, legend=True, **kwargs)

base_expected = ["0", "1", "2", "3"]
for i, ax in enumerate(axes):
Expand Down