Skip to content

Commit

Permalink
Update _core.py with multiline exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadmustafaanis authored Oct 30, 2023
1 parent 5692a40 commit 5b22811
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,10 @@ def __call__(self, *args, **kwargs):
return plot_backend.plot(self._parent, x=x, y=y, kind=kind, **kwargs)

if kind not in self._all_kinds:
raise ValueError(f"{kind} is not a valid plot kind\nValid plot kinds {self._all_kinds}")
raise ValueError(
f"{kind} is not a valid plot kind "
f"Valid plot kinds: {self._all_kinds}"
)

# The original data structured can be transformed before passed to the
# backend. For example, for DataFrame is common to set the index as the
Expand Down

0 comments on commit 5b22811

Please sign in to comment.