From 0771619f41f8505e977019b6be38618ce0ea9a7f Mon Sep 17 00:00:00 2001 From: Guilherme Maruta <168042965+hiyuk1@users.noreply.github.com> Date: Thu, 17 Jul 2025 23:10:05 -0300 Subject: [PATCH] Adding examples _typing.py Added simple examples to Renamer --- pandas/_typing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/_typing.py b/pandas/_typing.py index 889252bb00438..530fb6f60c1d0 100644 --- a/pandas/_typing.py +++ b/pandas/_typing.py @@ -219,6 +219,8 @@ def __reversed__(self) -> Iterator[_T_co]: ... ) # For functions like rename that convert one label to another +# For example, you can pass a dict like {'old_name' : 'new_name'} +# or a function like str.lower Renamer: TypeAlias = Mapping[Any, Hashable] | Callable[[Any], Hashable] # to maintain type information across generic functions and parametrization