Skip to content

Commit 3895156

Browse files
ensalada-de-polloroot
and
root
authored
DOC: Fix docstrings api.types.pandas_dtype (#60319)
* add api.types.pandas_dtype PR07, RT03, SA01 docstrings * remove from code_checks.sh * edit see also --------- Co-authored-by: root <[email protected]>
1 parent 12d6f60 commit 3895156

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8484
-i "pandas.Timestamp.resolution PR02" \
8585
-i "pandas.Timestamp.tzinfo GL08" \
8686
-i "pandas.api.types.is_re_compilable PR07,SA01" \
87-
-i "pandas.api.types.pandas_dtype PR07,RT03,SA01" \
8887
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
8988
-i "pandas.arrays.IntegerArray SA01" \
9089
-i "pandas.arrays.IntervalArray.length SA01" \

pandas/core/dtypes/common.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -1785,16 +1785,22 @@ def pandas_dtype(dtype) -> DtypeObj:
17851785
17861786
Parameters
17871787
----------
1788-
dtype : object to be converted
1788+
dtype : object
1789+
The object to be converted into a dtype.
17891790
17901791
Returns
17911792
-------
17921793
np.dtype or a pandas dtype
1794+
The converted dtype, which can be either a numpy dtype or a pandas dtype.
17931795
17941796
Raises
17951797
------
17961798
TypeError if not a dtype
17971799
1800+
See Also
1801+
--------
1802+
api.types.is_dtype : Return true if the condition is satisfied for the arr_or_dtype.
1803+
17981804
Examples
17991805
--------
18001806
>>> pd.api.types.pandas_dtype(int)

0 commit comments

Comments
 (0)