Skip to content

Commit b1f2225

Browse files
author
Nick Eubank
committed
move MergeError to pandas/errors
1 parent 031fd88 commit b1f2225

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pandas/core/reshape/merge.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import pandas.core.algorithms as algos
4141
import pandas.core.common as com
4242
from pandas._libs import hashtable as libhashtable, join as libjoin, lib
43+
from pandas.errors import MergeError
4344

4445

4546
@Substitution('\nleft : DataFrame')
@@ -60,10 +61,6 @@ def merge(left, right, how='inner', on=None, left_on=None, right_on=None,
6061
merge.__doc__ = _merge_doc % '\nleft : DataFrame'
6162

6263

63-
class MergeError(ValueError):
64-
pass
65-
66-
6764
def _groupby_and_merge(by, on, left, right, _merge_pieces,
6865
check_duplicates=True):
6966
"""

pandas/errors/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@ class ParserWarning(Warning):
5757
"""
5858

5959

60+
class MergeError(ValueError):
61+
"""
62+
Error raised when problems arise during merging due to problems
63+
with input data. Subclass of `ValueError`.
64+
65+
"""

0 commit comments

Comments
 (0)