Skip to content

Commit 72beba9

Browse files
committed
DOC: Improve rst file and test case comments for arrow groupby NA fix
1 parent 6c435c5 commit 72beba9

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
@@ -618,8 +618,6 @@ Performance improvements
618618

619619
Bug fixes
620620
~~~~~~~~~
621-
- 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`)
622-
623621

624622
Categorical
625623
^^^^^^^^^^^
@@ -783,6 +781,7 @@ Sparse
783781
ExtensionArray
784782
^^^^^^^^^^^^^^
785783
- Bug in :meth:`.arrays.ArrowExtensionArray.__setitem__` which caused wrong behavior when using an integer array with repeated values as a key (:issue:`58530`)
784+
- Bug in :meth:`ArrowExtensionArray.factorize` where NA values were dropped when input was dictionary-encoded even when dropna was set to False(:issue:`60567`)
786785
- Bug in :meth:`api.types.is_datetime64_any_dtype` where a custom :class:`ExtensionDtype` would return ``False`` for array-likes (:issue:`57055`)
787786
- 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`)
788787
- 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
@@ -3330,11 +3330,10 @@ def test_factorize_chunked_dictionary():
33303330

33313331

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

0 commit comments

Comments
 (0)