doc/source/reference/aliases.rst
{{ header }}
.. _api.typing.aliases:
{{ header }}
Typing aliases
.. module:: pandas.api.typing.aliases
.. raw:: html
<style>
td > dl.py.type { margin-bottom: 0; }
td > dl.py.type .descclassname { display: none; }
</style>
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 :py:mod:pandas.api.typing.aliases.
.. list-table:: :header-rows: 1 :widths: 30 70
DataFrame's <pandas.DataFrame.agg>, :meth:Series' <pandas.Series.agg>, and :meth:DataFrameGroupBy's <pandas.api.typing.DataFrameGroupBy.aggregate> aggregate() methodsjoin in :meth:DataFrame's <pandas.DataFrame.align> and :meth:Series' <pandas.Series.align> align() methodshow in :meth:DataFrame's <pandas.DataFrame.dropna> and :meth:Series' <pandas.Series.dropna> dropna() methods~pandas.api.extensions.ExtensionArray, numpy arrays, :class:~pandas.Index and :class:~pandas.Series~pandas.api.extensions.ExtensionArray, numpy arraysDataFrame's <pandas.DataFrame.astype> and :meth:Series' <pandas.Series.astype> astype() methodsAnyArrayLike plus sequences (not strings) and rangeaxis in many methodsengine in :meth:pandas.read_csvcolspace in :meth:pandas.DataFrame.to_htmlcompression in all I/O output methods except :meth:pandas.DataFrame.to_parquetcorrelation in :meth:DataFrame's <pandas.DataFrame.corr> and :meth:Series' <pandas.Series.corr> corr() methodskeep in :meth:DataFrame's <pandas.DataFrame.drop_duplicates> and :meth:Series' <pandas.Series.drop_duplicates> drop_duplicates() methodsdtype in various methodsdtype_backend in various methodsif_sheet_exists in :class:~pandas.ExcelWritermerge_cells in :meth:DataFrame's <pandas.DataFrame.to_excel> and :meth:Series' <pandas.Series.to_excel> to_excel() methodsmethod in various methods where NA values are filledfloat_format in :meth:DataFrame's <pandas.DataFrame.to_string> and :meth:Series' <pandas.Series.to_string> to_string() methodsformatters in :meth:DataFrame's <pandas.DataFrame.to_string> and :meth:Series' <pandas.Series.to_string> to_string() methodsorient in :meth:DataFrame.from_dict() <pandas.DataFrame.from_dict>flavor in :meth:pandas.read_htmlerrors in multiple methodslevel in multiple methodsinterpolate in :meth:DataFrame's <pandas.DataFrame.interpolate> and :meth:Series' <pandas.Series.interpolate> interpolate() methodsclosed in :class:~pandas.Interval, :class:~pandas.IntervalIndex, and inclusive in various methodsclosed to be left or right in :class:~pandas.Interval, :class:~pandas.IntervalIndex, and inclusive in various methodsengine in :meth:pandas.read_jsondefault_handler in :meth:DataFrame's <pandas.DataFrame.to_json> and :meth:Series' <pandas.Series.to_json> to_json() methodshow in :meth:pandas.merge_ordered and for join in :meth:Series.align() <pandas.Series.align>validate in :meth:DataFrame.join() <pandas.DataFrame.join>how in :meth:pandas.mergevalidate in :meth:pandas.mergena_position in :meth:DataFrame's <pandas.DataFrame.sort_values> and :meth:Series' <pandas.Series.sort_values> sort_values() methodskeep in :meth:DataFrame's <pandas.DataFrame.nlargest> and :meth:Series' <pandas.Series.nlargest> nlargest(), :meth:DataFrame's <pandas.DataFrame.nsmallest> and :meth:Series' <pandas.Series.nsmallest> nsmallest(), and :meth:SeriesGroupBy's <pandas.api.typing.SeriesGroupBy.nlargest> nlargest() methodserrors in :meth:DataFrame's <pandas.DataFrame.to_hdf>, :meth:Series' <pandas.Series.to_hdf> to_hdf() methods, and :meth:DataFrame's <pandas.DataFrame.to_csv> and :meth:Series' <pandas.Series.to_csv> to_csv() methodsordered <pandas.CategoricalDtype.ordered> in :class:pandas.CategoricalDtype and :class:pandas.Categoricalcompression in :meth:DataFrame.to_parquet() <pandas.DataFrame.to_parquet>interpolation in :meth:DataFrame's <pandas.DataFrame.quantile> and :meth:Series' <pandas.Series.quantile> quantile() methodspandas.read_csvpandas.read_picklereindex in :meth:DataFrame's <pandas.DataFrame.reindex> and :meth:Series' <pandas.Series.reindex> reindex() methods~pandas.Series with non-object dtypekey argument in __getitem__() methodskey argument in __getitem__() methodsstart and end in :meth:Index.slice_locs() <pandas.Index.slice_locs>kind in :meth:DataFrame's <pandas.DataFrame.sort_values> and :meth:Series' <pandas.Series.sort_values> sort_values() methodsstorage_options in various file output methodssuffixes in :meth:pandas.merge, :meth:pandas.merge_ordered, and :meth:DataFrame's <pandas.DataFrame.compare> and :meth:Series' <pandas.Series.compare> compare() methodsindexer and indices in :meth:DataFrame's <pandas.DataFrame.take> and :meth:Series' <pandas.Series.take> take() methodsambiguous in time operationsorigin in :meth:DataFrame's <pandas.DataFrame.resample>, :meth:Series' <pandas.Series.resample> resample() methods and for :class:~pandas.Groupernonexistent in time operationspandas.Timedelta.unit, arguments unit and date_unitoffset in various methods, such as :meth:DataFrame's <pandas.DataFrame.resample> and :meth:Series' <pandas.Series.resample> resample(), halflife in :meth:DataFrame's <pandas.DataFrame.ewm>, :meth:DataFrameGroupBy's <pandas.api.typing.DataFrameGroupBy.ewm>, and :meth:Series' <pandas.Series.ewm> ewm(), and start and end in :meth:pandas.timedelta_rangeorigin in :meth:DataFrame's <pandas.DataFrame.resample> and :meth:Series' <pandas.Series.resample> resample(), and in :meth:pandas.to_datetimebyteorder in :meth:DataFrame.to_stata() <pandas.DataFrame.to_stata>how in :meth:DataFrame's <pandas.DataFrame.to_timestamp> and :meth:Series' <pandas.Series.to_timestamp> to_timestamp() methods, and convention in :meth:DataFrame's <pandas.DataFrame.resample> and :meth:Series' <pandas.Series.resample> resample() methodsjoin in :meth:DataFrame.update() <pandas.DataFrame.update>usecols in :meth:pandas.read_clipboard, :meth:pandas.read_csv and :meth:pandas.read_excelmethod in :meth:Rolling's <pandas.api.typing.Rolling.rank> and :meth:Expanding's <pandas.api.typing.Expanding.rank> rank() methods, applicable in rolling and expanding window operationsDataFrame's <pandas.DataFrame.to_excel>, :meth:Series' <pandas.Series.to_excel> and :meth:Styler's <pandas.io.formats.style.Styler.to_excel> to_excel() methodsparser in :meth:DataFrame.to_xml() <pandas.DataFrame.to_xml> and :meth:pandas.read_xml