From 602ae10f3d0d599ebbdd151e8a09f0baf20b4637 Mon Sep 17 00:00:00 2001 From: William Andrea <22385371+wjandrea@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:31:11 -0400 Subject: [PATCH] DOC: Fix "kwargs" description for .assign() (#60588) Fix "kwargs" description for .assign() "kwargs" isn't a dict; the keyword arguments are *converted* to a dict. Secondly, keyword arguments are strings by definition. --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 34b448a0d8d1c..02878b36a379e 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -5009,7 +5009,7 @@ def assign(self, **kwargs) -> DataFrame: Parameters ---------- - **kwargs : dict of {str: callable or Series} + **kwargs : callable or Series The column names are keywords. If the values are callable, they are computed on the DataFrame and assigned to the new columns. The callable must not