Skip to content

Commit af32b91

Browse files
committed
fix errors
1 parent f12c14d commit af32b91

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
@@ -2302,7 +2302,7 @@ def is_integer(self) -> bool:
23022302
is_boolean : Check if the Index only consists of booleans (deprecated).
23032303
is_floating : Check if the Index is a floating type (deprecated).
23042304
is_numeric : Check if the Index only consists of numeric data.
2305-
is_object : Check if the Index is of the object dtype. (deprecated)
2305+
is_object : Check if the Index is of the object dtype. (deprecated).
23062306
is_categorical : Check if the Index holds categorical data (deprecated).
23072307
is_interval : Check if the Index holds Interval objects (deprecated).
23082308
@@ -2350,7 +2350,7 @@ def is_floating(self) -> bool:
23502350
is_boolean : Check if the Index only consists of booleans (deprecated).
23512351
is_integer : Check if the Index only consists of integers (deprecated).
23522352
is_numeric : Check if the Index only consists of numeric data.
2353-
is_object : Check if the Index is of the object dtype. (deprecated)
2353+
is_object : Check if the Index is of the object dtype. (deprecated).
23542354
is_categorical : Check if the Index holds categorical data (deprecated).
23552355
is_interval : Check if the Index holds Interval objects (deprecated).
23562356
@@ -2395,7 +2395,7 @@ def is_numeric(self) -> bool:
23952395
is_boolean : Check if the Index only consists of booleans (deprecated).
23962396
is_integer : Check if the Index only consists of integers (deprecated).
23972397
is_floating : Check if the Index is a floating type (deprecated).
2398-
is_object : Check if the Index is of the object dtype. (deprecated)
2398+
is_object : Check if the Index is of the object dtype. (deprecated).
23992399
is_categorical : Check if the Index holds categorical data (deprecated).
24002400
is_interval : Check if the Index holds Interval objects (deprecated).
24012401
@@ -2545,7 +2545,7 @@ def is_interval(self) -> bool:
25452545
is_integer : Check if the Index only consists of integers (deprecated).
25462546
is_floating : Check if the Index is a floating type (deprecated).
25472547
is_numeric : Check if the Index only consists of numeric data.
2548-
is_object : Check if the Index is of the object dtype. (deprecated)
2548+
is_object : Check if the Index is of the object dtype. (deprecated).
25492549
is_categorical : Check if the Index holds categorical data (deprecated).
25502550
25512551
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)