Skip to content

Commit da34d46

Browse files
committed
BUG: Chore Conditional block
1 parent 50b0c33 commit da34d46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/plotting/_matplotlib/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,12 +451,12 @@ def _validate_color_args(self, color, colormap):
451451
)
452452

453453
if self.style is not None:
454-
if is_list_like(self.style):
454+
if isinstance(self.style, dict):
455+
styles = [self.style[col] for col in self.columns if col in self.style]
456+
elif is_list_like(self.style):
455457
styles = self.style
456458
else:
457459
styles = [self.style]
458-
if isinstance(self.style, dict):
459-
styles = [self.style[col] for col in self.columns if col in self.style]
460460
# need only a single match
461461
for s in styles:
462462
if _color_in_style(s):

0 commit comments

Comments
 (0)