Skip to content

Commit

Permalink
Update apply.py assertion message
Browse files Browse the repository at this point in the history
Improved assertion message for possible duplicate column names
  • Loading branch information
nekkomira authored Dec 4, 2023
1 parent 7b528c9 commit 62dd22d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/core/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62dd22d

Please sign in to comment.