diff --git a/pandas/core/dtypes/concat.py b/pandas/core/dtypes/concat.py index 91d5ac865b6b6..03429fd9fee1d 100644 --- a/pandas/core/dtypes/concat.py +++ b/pandas/core/dtypes/concat.py @@ -284,8 +284,7 @@ def _maybe_unwrap(x): if all(c.ordered for c in to_union): msg = "to union ordered Categoricals, all categories must be the same" raise TypeError(msg) - else: - raise TypeError("Categorical.ordered must be the same") + raise TypeError("Categorical.ordered must be the same") if ignore_order: ordered = False