Skip to content

DOC: Fix docstring validation errors for pandas.util.hash_pandas_object #62075

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 1 addition & 2 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.YearEnd.is_on_offset GL08" \
-i "pandas.tseries.offsets.YearEnd.month GL08" \
-i "pandas.tseries.offsets.YearEnd.n GL08" \
-i "pandas.tseries.offsets.YearEnd.normalize GL08" \
-i "pandas.util.hash_pandas_object PR07,SA01" # There should be no backslash in the final line, please keep this comment in the last ignored function
-i "pandas.tseries.offsets.YearEnd.normalize GL08" # There should be no backslash in the final line, please keep this comment in the last ignored function

RET=$(($RET + $?)) ; echo $MSG "DONE"

Expand Down
7 changes: 7 additions & 0 deletions pandas/core/util/hashing.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def hash_pandas_object(
Parameters
----------
obj : Index, Series, or DataFrame
The pandas object to hash. This can be a single-dimensional Index or Series,
or a multi-dimensional DataFrame.
index : bool, default True
Include the index in the hash (if Series/DataFrame).
encoding : str, default 'utf8'
Expand All @@ -109,6 +111,11 @@ def hash_pandas_object(
Series of uint64
Same length as the object.

See Also
--------
util.hash_array : Hash the elements of a 1D NumPy or ExtensionArray.
util.combine_hash_arrays : Combine multiple hash arrays into a single hash.

Examples
--------
>>> pd.util.hash_pandas_object(pd.Series([1, 2, 3]))
Expand Down
Loading