From 62dd22d90d780c6c9f71af80aa1c8fc5f2498a53 Mon Sep 17 00:00:00 2001 From: Namira-Kamal <102487879+Namira-Kamal@users.noreply.github.com> Date: Mon, 4 Dec 2023 09:01:39 -0500 Subject: [PATCH] Update apply.py assertion message Improved assertion message for possible duplicate column names --- pandas/core/apply.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/apply.py b/pandas/core/apply.py index bb3cc3a03760f..0c1a39b82aee8 100644 --- a/pandas/core/apply.py +++ b/pandas/core/apply.py @@ -651,7 +651,7 @@ def normalize_dictlike_arg( and any(is_list_like(v) for _, v in func.items()) ) or (any(is_dict_like(v) for _, v in func.items())): # GH 15931 - deprecation of renaming keys - raise SpecificationError("nested renamer is not supported") + raise SpecificationError("nested renamer is not supported. Possible duplicate column names.") if obj.ndim != 1: # Check for missing columns on a frame