Skip to content

Commit 7a3e501

Browse files
committed
Fixed failed pre-commit.ci hooks : Formatting errors in algorithms.py, inconsistent-namespace-usage in test_isin.py, sorted whatsnew entry
1 parent dbe3673 commit 7a3e501

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

doc/source/whatsnew/v3.0.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -800,11 +800,11 @@ Other
800800
- Bug in :meth:`Index.sort_values` when passing a key function that turns values into tuples, e.g. ``key=natsort.natsort_key``, would raise ``TypeError`` (:issue:`56081`)
801801
- Bug in :meth:`Series.diff` allowing non-integer values for the ``periods`` argument. (:issue:`56607`)
802802
- Bug in :meth:`Series.dt` methods in :class:`ArrowDtype` that were returning incorrect values. (:issue:`57355`)
803+
- Bug in :meth:`Series.isin` raising ``TypeError`` when series is large (>10**6) and ``values`` contains NA (:issue:`60678`)
803804
- Bug in :meth:`Series.rank` that doesn't preserve missing values for nullable integers when ``na_option='keep'``. (:issue:`56976`)
804805
- Bug in :meth:`Series.replace` and :meth:`DataFrame.replace` inconsistently replacing matching instances when ``regex=True`` and missing values are present. (:issue:`56599`)
805806
- Bug in :meth:`Series.replace` and :meth:`DataFrame.replace` throwing ``ValueError`` when ``regex=True`` and all NA values. (:issue:`60688`)
806807
- Bug in :meth:`Series.to_string` when series contains complex floats with exponents (:issue:`60405`)
807-
- Bug in :meth:`Series.isin` raising ``TypeError`` when series is large (>10**6) and ``values`` contains NA (:issue:`60678`)
808808
- Bug in :meth:`read_csv` where chained fsspec TAR file and ``compression="infer"`` fails with ``tarfile.ReadError`` (:issue:`60028`)
809809
- Bug in Dataframe Interchange Protocol implementation was returning incorrect results for data buffers' associated dtype, for string and datetime columns (:issue:`54781`)
810810
- Bug in ``Series.list`` methods not preserving the original :class:`Index`. (:issue:`58425`)

pandas/core/algorithms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ def isin(comps: ListLike, values: ListLike) -> npt.NDArray[np.bool_]:
559559
len(comps_array) > _MINIMUM_COMP_ARR_LEN
560560
and len(values) <= 26
561561
and comps_array.dtype != object
562-
and values_contains_NA == False
562+
and not values_contains_NA
563563
):
564564
# If the values include nan we need to check for nan explicitly
565565
# since np.nan it not equal to np.nan

pandas/tests/series/methods/test_isin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def test_isin_large_series_and_pdNA(dtype, data, values, expected, monkeypatch):
224224
# values contains pdNA
225225
min_isin_comp = 2
226226
ser = Series(data, dtype=dtype)
227-
expected = pd.Series(expected, dtype="boolean")
227+
expected = Series(expected, dtype="boolean")
228228

229229
with monkeypatch.context() as m:
230230
m.setattr(algorithms, "_MINIMUM_COMP_ARR_LEN", min_isin_comp)

0 commit comments

Comments
 (0)