Skip to content

Commit de3e2d2

Browse files
committed
fix errors
1 parent 74de81b commit de3e2d2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pandas/core/indexes/base.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2270,7 +2270,7 @@ def is_integer(self) -> bool:
22702270
is_boolean : Check if the Index only consists of booleans (deprecated).
22712271
is_floating : Check if the Index is a floating type (deprecated).
22722272
is_numeric : Check if the Index only consists of numeric data.
2273-
is_object : Check if the Index is of the object dtype. (deprecated)
2273+
is_object : Check if the Index is of the object dtype. (deprecated).
22742274
is_categorical : Check if the Index holds categorical data (deprecated).
22752275
is_interval : Check if the Index holds Interval objects (deprecated).
22762276
@@ -2318,7 +2318,7 @@ def is_floating(self) -> bool:
23182318
is_boolean : Check if the Index only consists of booleans (deprecated).
23192319
is_integer : Check if the Index only consists of integers (deprecated).
23202320
is_numeric : Check if the Index only consists of numeric data.
2321-
is_object : Check if the Index is of the object dtype. (deprecated)
2321+
is_object : Check if the Index is of the object dtype. (deprecated).
23222322
is_categorical : Check if the Index holds categorical data (deprecated).
23232323
is_interval : Check if the Index holds Interval objects (deprecated).
23242324
@@ -2363,7 +2363,7 @@ def is_numeric(self) -> bool:
23632363
is_boolean : Check if the Index only consists of booleans (deprecated).
23642364
is_integer : Check if the Index only consists of integers (deprecated).
23652365
is_floating : Check if the Index is a floating type (deprecated).
2366-
is_object : Check if the Index is of the object dtype. (deprecated)
2366+
is_object : Check if the Index is of the object dtype. (deprecated).
23672367
is_categorical : Check if the Index holds categorical data (deprecated).
23682368
is_interval : Check if the Index holds Interval objects (deprecated).
23692369
@@ -2513,7 +2513,7 @@ def is_interval(self) -> bool:
25132513
is_integer : Check if the Index only consists of integers (deprecated).
25142514
is_floating : Check if the Index is a floating type (deprecated).
25152515
is_numeric : Check if the Index only consists of numeric data.
2516-
is_object : Check if the Index is of the object dtype. (deprecated)
2516+
is_object : Check if the Index is of the object dtype. (deprecated).
25172517
is_categorical : Check if the Index holds categorical data (deprecated).
25182518
25192519
Examples

pandas/tests/series/methods/test_drop.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Series,
66
)
77
import pandas._testing as tm
8+
from pandas.api.types import is_bool_dtype
89

910

1011
@pytest.mark.parametrize(
@@ -57,7 +58,7 @@ def test_drop_with_ignore_errors():
5758

5859
# GH 8522
5960
ser = Series([2, 3], index=[True, False])
60-
assert not ser.index.is_object()
61+
assert is_bool_dtype(ser.index)
6162
assert ser.index.dtype == bool
6263
result = ser.drop(True)
6364
expected = Series([3], index=[False])

0 commit comments

Comments
 (0)