Skip to content

Commit 2bb1fbd

Browse files
committed
remove AmbiguousIndexError, completely unused
1 parent 5754630 commit 2bb1fbd

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

pandas/core/common.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222

2323
# compat
2424
from pandas.errors import ( # noqa
25-
PerformanceWarning,
26-
AmbiguousIndexError, UnsupportedFunctionCall, UnsortedIndexError)
25+
PerformanceWarning, UnsupportedFunctionCall, UnsortedIndexError)
2726

2827
# back-compat of public API
2928
# deprecate these functions

pandas/core/indexing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ def _convert_to_indexer(self, obj, axis=0, is_setter=False):
11401140
ix[['foo', 'bar', 'baz']] -> [i, j, k] (indices of foo, bar, baz)
11411141
11421142
Going by Zen of Python?
1143-
"In the face of ambiguity, refuse the temptation to guess."
1143+
'In the face of ambiguity, refuse the temptation to guess.'
11441144
raise AmbiguousIndexError with integer labels?
11451145
- No, prefer label-based indexing
11461146
"""

pandas/errors/__init__.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66

77

88
class PerformanceWarning(Warning):
9-
pass
10-
11-
class AmbiguousIndexError(KeyError):
12-
pass
13-
9+
"""
10+
Warnings shown when there is a possible performance
11+
impact.
12+
"""
1413

1514
class UnsupportedFunctionCall(ValueError):
1615
pass

pandas/tests/test_errors.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77

88
@pytest.mark.parametrize(
9-
"exc", ['AmbiguousIndexError',
10-
'UnsupportedFunctionCall', 'UnsortedIndexError',
9+
"exc", ['UnsupportedFunctionCall', 'UnsortedIndexError',
1110
'OutOfBoundsDatetime',
1211
'ParserError', 'PerformanceWarning', 'DtypeWarning',
1312
'EmptyDataError', 'ParserWarning'])

0 commit comments

Comments
 (0)