Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Timestamp.resolution PR02" \
-i "pandas.Timestamp.tzinfo GL08" \
-i "pandas.api.types.is_re_compilable PR07,SA01" \
-i "pandas.api.types.pandas_dtype PR07,RT03,SA01" \
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
-i "pandas.arrays.IntegerArray SA01" \
-i "pandas.arrays.IntervalArray.length SA01" \
Expand Down
8 changes: 7 additions & 1 deletion pandas/core/dtypes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1785,16 +1785,22 @@ def pandas_dtype(dtype) -> DtypeObj:

Parameters
----------
dtype : object to be converted
dtype : object
The object to be converted into a dtype.

Returns
-------
np.dtype or a pandas dtype
The converted dtype, which can be either a numpy dtype or a pandas dtype.

Raises
------
TypeError if not a dtype

See Also
--------
api.types.is_dtype : Return true if the condition is satisfied for the arr_or_dtype.

Examples
--------
>>> pd.api.types.pandas_dtype(int)
Expand Down