Skip to content

Commit b8083a9

Browse files
Address code review comments
Removed the superfluous check testing whether fill_value was a NaN or not (in pandas/core/arrays/masked.py::take). pylint properly flags an unnecessary implementation of TestGroupby.test_groupby_agg_extension (which merely calls the parent method by the same name). By deleting that implementation, the parent method is called automatically. Signed-off-by: Michael Tiemann <[email protected]>
1 parent e53a62c commit b8083a9

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

pandas/core/arrays/masked.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ def take(
872872
# TODO(jreback) what if we have a non-na float as a fill value?
873873
# NaN with uncertainties is scalar but does not register as `isna`,
874874
# so use fact that NaN != NaN
875-
if allow_fill and notna(fill_value) and fill_value == fill_value:
875+
if allow_fill and notna(fill_value):
876876
fill_mask = np.asarray(indexer) == -1
877877
result[fill_mask] = fill_value
878878
mask = mask ^ fill_mask

pandas/tests/extension/json/test_json.py

-3
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,6 @@ def test_groupby_extension_no_sort(self):
356356
"""
357357
super().test_groupby_extension_no_sort()
358358

359-
def test_groupby_agg_extension(self, data_for_grouping):
360-
super().test_groupby_agg_extension(data_for_grouping)
361-
362359

363360
class TestArithmeticOps(BaseJSON, base.BaseArithmeticOpsTests):
364361
def test_arith_frame_with_scalar(self, data, all_arithmetic_operators, request):

0 commit comments

Comments
 (0)