Skip to content

Commit 76b6434

Browse files
committed
ENH: Introduce UnsortedIndexError pandas-dev#11897
ERR: Change error message pandas-dev#14491
1 parent c4e7a2a commit 76b6434

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

pandas/core/common.py

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ class UnsortedIndexError(KeyError):
105105
106106
"""
107107
pass
108-
109108

110109

111110
class AbstractMethodError(NotImplementedError):

pandas/core/indexing.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1814,9 +1814,9 @@ def check_bool_indexer(ax, key):
18141814
result = result.reindex(ax)
18151815
mask = isnull(result._values)
18161816
if mask.any():
1817-
raise IndexingError('Unalignable boolean Series provided as indexer '
1818-
'(index of the boolean Series and of the indexed '
1819-
'object do not match')
1817+
raise IndexingError('Unalignable boolean Series provided as '
1818+
'indexer (index of the boolean Series and of '
1819+
'the indexed object do not match')
18201820
result = result.astype(bool)._values
18211821
elif is_sparse(result):
18221822
result = result.to_dense()

pandas/tests/indexing/test_indexing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3484,8 +3484,8 @@ def test_iloc_mask(self):
34843484
'(index of the boolean Series and of the indexed '
34853485
'object do not match',
34863486
('locs', '.loc'): 'Unalignable boolean Series provided as indexer '
3487-
'(index of the boolean Series and of the indexed '
3488-
'object do not match',
3487+
'(index of the boolean Series and of the '
3488+
'indexed object do not match',
34893489
('locs', '.iloc'): ('iLocation based boolean indexing on an '
34903490
'integer type is not available'),
34913491
}

0 commit comments

Comments
 (0)