Skip to content

Commit f530e6f

Browse files
committed
GH ref
1 parent e122455 commit f530e6f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Other enhancements
8181
- :meth:`Rolling.agg`, :meth:`Expanding.agg` and :meth:`ExponentialMovingWindow.agg` now accept :class:`NamedAgg` aggregations through ``**kwargs`` (:issue:`28333`)
8282
- :meth:`Series.map` can now accept kwargs to pass on to func (:issue:`59814`)
8383
- :meth:`Series.map` now accepts an ``engine`` parameter to allow execution with a third-party execution engine (:issue:`61125`)
84+
- :meth:`Series.rank` and :meth:`DataFrame.rank` with numpy-nullable dtypes preserve ``NA`` values and return ``UInt64`` dtype where appropriate instead of casting ``NA`` to ``NaN`` with ``float64`` dtype (:issue:`62043`)
8485
- :meth:`Series.str.get_dummies` now accepts a ``dtype`` parameter to specify the dtype of the resulting DataFrame (:issue:`47872`)
8586
- :meth:`pandas.concat` will raise a ``ValueError`` when ``ignore_index=True`` and ``keys`` is not ``None`` (:issue:`59274`)
8687
- :py:class:`frozenset` elements in pandas objects are now natively printed (:issue:`60690`)
@@ -95,7 +96,6 @@ Other enhancements
9596
- Support passing a :class:`Iterable[Hashable]` input to :meth:`DataFrame.drop_duplicates` (:issue:`59237`)
9697
- Support reading Stata 102-format (Stata 1) dta files (:issue:`58978`)
9798
- Support reading Stata 110-format (Stata 7) dta files (:issue:`47176`)
98-
- :meth:`Series.rank` and :meth:`DataFrame.rank` with numpy-nullable dtypes preserve ``NA`` values and return ``UInt64`` dtype where appropriate instead of casting ``NA`` to ``NaN`` with ``float64`` dtype (:issue:`??`)
9999

100100
.. ---------------------------------------------------------------------------
101101
.. _whatsnew_300.notable_bug_fixes:

pandas/core/arrays/masked.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ def _rank(
10021002
ascending: bool = True,
10031003
pct: bool = False,
10041004
):
1005-
# Avoid going through copy-making ensure_data in algorithms.rank
1005+
# GH#62043 Avoid going through copy-making ensure_data in algorithms.rank
10061006
if axis != 0 or self.ndim != 1:
10071007
raise NotImplementedError
10081008

pandas/tests/series/methods/test_rank.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ def test_rank_tie_methods_on_infs_nans(
308308
else:
309309
exp_dtype = "uint64[pyarrow]"
310310
elif dtype == "Float64":
311+
# GH#62043
311312
if rank_method == "average":
312313
exp_dtype = "Float64"
313314
else:

0 commit comments

Comments
 (0)