Skip to content
Closed
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 @@ -107,7 +107,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Timestamp.resolution PR02" \
-i "pandas.Timestamp.tzinfo GL08" \
-i "pandas.Timestamp.year GL08" \
-i "pandas.api.types.is_dict_like PR07,SA01" \
-i "pandas.api.types.is_file_like PR07,SA01" \
-i "pandas.api.types.is_float PR01,SA01" \
-i "pandas.api.types.is_hashable PR01,RT03,SA01" \
Expand Down
14 changes: 12 additions & 2 deletions pandas/core/dtypes/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,24 @@ def is_dict_like(obj: object) -> bool:
"""
Check if the object is dict-like.

This function checks if the input object has dictionary-like behavior,
specifically if it implements methods like ``__getitem__``, ``keys``, and
``__contains__``.

Parameters
----------
obj : The object to check
obj : object
The object to check for dict-like behavior.

Returns
-------
bool
Whether `obj` has dict-like properties.
Whether ``obj`` has dict-like properties.

See Also
--------
api.types.is_list_like : Check if the object is list-like.
api.types.is_scalar : Return True if given object is scalar.

Examples
--------
Expand Down
Loading