Skip to content

Commit dd936ad

Browse files
committed
fix - precomit failures
1 parent b8ce7b7 commit dd936ad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pandas/core/indexing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,13 +1611,13 @@ def _validate_key(self, key, axis: AxisInt) -> None:
16111611
raise IndexError(f".iloc requires numeric indexers, got {arr}")
16121612

16131613
if len(arr):
1614-
# convert to numpy array to ensure min/max work with ExtensionArrays
1614+
# convert to numpy array for min/max with ExtensionArrays
16151615
if hasattr(arr, 'to_numpy'):
16161616
np_arr = arr.to_numpy()
16171617
else:
16181618
np_arr = np.asarray(arr)
1619-
1620-
# check that the key does not exceed the maximum size of the index
1619+
1620+
# check that the key does not exceed the maximum size
16211621
if np.max(np_arr) >= len_axis or np.min(np_arr) < -len_axis:
16221622
raise IndexError("positional indexers are out-of-bounds")
16231623
else:

pandas/tests/indexing/test_iloc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,13 +1486,13 @@ def test_iloc_nullable_int64_size_1_nan(self):
14861486
def test_iloc_arrow_extension_array(self):
14871487
# GH#61311
14881488
pytest.importorskip("pyarrow")
1489-
1489+
14901490
df = DataFrame({
14911491
"a": [1, 2],
14921492
"c": [0, 2],
14931493
"d": ["c", "a"]
14941494
})
1495-
1495+
14961496
df_arrow = df.convert_dtypes(dtype_backend="pyarrow")
14971497
result = df_arrow.iloc[:, df_arrow["c"]]
14981498
expected = df_arrow.iloc[:, [0, 2]]

0 commit comments

Comments
 (0)