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