Skip to content

Commit 226ae6c

Browse files
committed
DOC: Improve rst file and test case comments for arrow groupby NA fix
1 parent 7f81314 commit 226ae6c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

doc/source/whatsnew/v3.0.0.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,6 @@ Performance improvements
615615

616616
Bug fixes
617617
~~~~~~~~~
618-
- Fixed bug in :meth:`ArrowExtensionArray.factorize` where NA values were dropped when input was dictionary-encoded even when dropna was set to False(:issue:`60567`)
619-
620618

621619
Categorical
622620
^^^^^^^^^^^
@@ -778,6 +776,7 @@ Sparse
778776
ExtensionArray
779777
^^^^^^^^^^^^^^
780778
- Bug in :meth:`.arrays.ArrowExtensionArray.__setitem__` which caused wrong behavior when using an integer array with repeated values as a key (:issue:`58530`)
779+
- Bug in :meth:`ArrowExtensionArray.factorize` where NA values were dropped when input was dictionary-encoded even when dropna was set to False(:issue:`60567`)
781780
- Bug in :meth:`api.types.is_datetime64_any_dtype` where a custom :class:`ExtensionDtype` would return ``False`` for array-likes (:issue:`57055`)
782781
- Bug in comparison between object with :class:`ArrowDtype` and incompatible-dtyped (e.g. string vs bool) incorrectly raising instead of returning all-``False`` (for ``==``) or all-``True`` (for ``!=``) (:issue:`59505`)
783782
- Bug in constructing pandas data structures when passing into ``dtype`` a string of the type followed by ``[pyarrow]`` while PyArrow is not installed would raise ``NameError`` rather than ``ImportError`` (:issue:`57928`)

pandas/tests/extension/test_arrow.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -3331,11 +3331,10 @@ def test_factorize_chunked_dictionary():
33313331

33323332

33333333
def test_factorize_dictionary_with_na():
3334-
# Test that factorize properly handles NA values in dictionary arrays
3334+
# GH#60567
33353335
arr = pd.array(
33363336
["a1", pd.NA], dtype=ArrowDtype(pa.dictionary(pa.int32(), pa.utf8()))
33373337
)
3338-
# Test with use_na_sentinel=False
33393338
indices, uniques = arr.factorize(use_na_sentinel=False)
33403339
expected_indices = np.array([0, 1], dtype=np.intp)
33413340
expected_uniques = pd.array(["a1", None], dtype=ArrowDtype(pa.string()))

0 commit comments

Comments
 (0)