From 6d47730c8aac7c69268ba8872e6c804405bc3ec2 Mon Sep 17 00:00:00 2001 From: Shubhankar Lohani Date: Thu, 17 Nov 2022 11:08:30 +0530 Subject: [PATCH] pandas/core/algorithms.py --- pandas/core/algorithms.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index cc5ff2e756cfa..426e48179842a 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -278,8 +278,8 @@ def _get_hashtable_algo(values: np.ndarray): values = _ensure_data(values) ndtype = _check_object_for_strings(values) - htable = _hashtables[ndtype] - return htable, values + hashtable = _hashtables[ndtype] + return hashtable, values def _check_object_for_strings(values: np.ndarray) -> str: @@ -416,9 +416,9 @@ def unique_with_mask(values, mask: npt.NDArray[np.bool_] | None = None): return values.unique() original = values - htable, values = _get_hashtable_algo(values) + hashtable, values = _get_hashtable_algo(values) - table = htable(len(values)) + table = hashtable(len(values)) if mask is None: uniques = table.unique(values) uniques = _reconstruct_data(uniques, original.dtype, original)