Skip to content

Commit

Permalink
DOC: add PR07,SA01 for pandas.api.types.infer_dtype (#58769)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhinsharma121 committed May 18, 2024
1 parent b804514 commit 07710a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.api.extensions.ExtensionArray.view SA01" \
-i "pandas.api.indexers.VariableOffsetWindowIndexer PR01,SA01" \
-i "pandas.api.interchange.from_dataframe RT03,SA01" \
-i "pandas.api.types.infer_dtype PR07,SA01" \
-i "pandas.api.types.is_any_real_numeric_dtype SA01" \
-i "pandas.api.types.is_bool PR01,SA01" \
-i "pandas.api.types.is_bool_dtype SA01" \
Expand Down
9 changes: 9 additions & 0 deletions pandas/_libs/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,7 @@ def infer_dtype(value: object, skipna: bool = True) -> str:
Parameters
----------
value : scalar, list, ndarray, or pandas type
The input data to infer the dtype.
skipna : bool, default True
Ignore NaN values when inferring the type.

Expand Down Expand Up @@ -1483,6 +1484,14 @@ def infer_dtype(value: object, skipna: bool = True) -> str:
TypeError
If ndarray-like but cannot infer the dtype

See Also
--------
api.types.is_scalar : Check if the input is a scalar.
api.types.is_list_like : Check if the input is list-like.
api.types.is_integer : Check if the input is an integer.
api.types.is_float : Check if the input is a float.
api.types.is_bool : Check if the input is a boolean.

Notes
-----
- 'mixed' is the catchall for anything that is not otherwise
Expand Down

0 comments on commit 07710a1

Please sign in to comment.