pandas typing aliases#
Typing aliases#
The typing declarations in pandas/_typing.py
are considered private, and used
by pandas developers for type checking of the pandas code base. For users, it is
highly recommended to use the pandas-stubs
package that represents the officially
supported type declarations for users of pandas.
They are documented here for users who wish to use these declarations in their
own python code that calls pandas or expects certain results.
Warning
Note that the definitions and use cases of these aliases are subject to change without notice in any major, minor, or patch release of pandas.
Each of these aliases listed in the table below can be found by importing them from pandas.api.typing.aliases
.
Alias |
Meaning |
---|---|
|
Type of functions that can be passed to |
|
Argument type for |
|
Argument type for |
|
Used to represent |
|
Used to represent |
|
Argument type in |
|
|
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Types as objects that can be used to specify dtypes |
|
Argument type for |
|
Argument type for |
|
Numpy dtypes and Extension dtypes |
|
Argument type for |
|
Argument type for |
|
Type of paths for files for I/O methods |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for the return type of a callable for argument |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Return type for |
|
Argument type for |
|
Argument type for |
|
Additional argument type corresponding to buffers for various file reading methods |
|
Additional argument type corresponding to buffers for |
|
Additional argument type corresponding to buffers for |
|
Argument type for |
|
Types that can be stored in |
|
Used for arguments that require sequences, but not plain strings |
|
Argument types for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Time unit argument and return type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Argument type for |
|
Additional argument type corresponding to buffers for various file output methods |
|
Additional argument type corresponding to buffers for |
|
Argument type for |