From 1c44d08a04c5693a678a75128f8636d1ac561187 Mon Sep 17 00:00:00 2001 From: Eliot Greenhalgh <97060609+EliotGreenhalgh123@users.noreply.github.com> Date: Fri, 8 Aug 2025 11:22:42 -0600 Subject: [PATCH] DOC: Fix docstring validation errors for pandas.util.hash_pandas_object --- ci/code_checks.sh | 3 +-- pandas/core/util/hashing.py | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index c710b7d34e9c5..8a3cea24fbcd2 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -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" diff --git a/pandas/core/util/hashing.py b/pandas/core/util/hashing.py index e120e69dc27cf..74e07616a9f93 100644 --- a/pandas/core/util/hashing.py +++ b/pandas/core/util/hashing.py @@ -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' @@ -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]))