Skip to content

Commit 0771619

Browse files
authored
Adding examples _typing.py
Added simple examples to Renamer
1 parent 4b18266 commit 0771619

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/_typing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ def __reversed__(self) -> Iterator[_T_co]: ...
219219
)
220220

221221
# For functions like rename that convert one label to another
222+
# For example, you can pass a dict like {'old_name' : 'new_name'}
223+
# or a function like str.lower
222224
Renamer: TypeAlias = Mapping[Any, Hashable] | Callable[[Any], Hashable]
223225

224226
# to maintain type information across generic functions and parametrization

0 commit comments

Comments
 (0)