Skip to content

Commit 97490e7

Browse files
committed
fix boxplot column misorder
1 parent e209a35 commit 97490e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/plotting/_matplotlib/boxplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def _make_plot(self, fig: Figure) -> None:
214214
# values, instead of label which is used as subtitle in this case.
215215
# error: "Index" has no attribute "levels"; maybe "nlevels"?
216216
levels = self.data.columns.levels # type: ignore[attr-defined]
217-
ticklabels = [pprint_thing(col) for col in levels[0]]
217+
ticklabels = [pprint_thing(col) for col in self.data.columns.get_level_values(0)] #
218218
else:
219219
ticklabels = [pprint_thing(label)]
220220

0 commit comments

Comments
 (0)