Skip to content

DOC: add PR07,SA01 for pandas.api.types.infer_dtype #58769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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 @@ -318,7 +318,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 @@ -1442,6 +1442,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 @@ -1476,6 +1477,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
Loading