From 5b228113bba849fe8313a57578b944442e8fb2fb Mon Sep 17 00:00:00 2001 From: Ahmad Mustafa Anis Date: Mon, 30 Oct 2023 23:01:18 +0500 Subject: [PATCH] Update _core.py with multiline exception message --- pandas/plotting/_core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 58fb333a5042c..74e680c307c62 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -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