Skip to content

Commit

Permalink
add deprecation warning for imports from pandas.tools.merge for concat
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed Feb 9, 2017
1 parent 09dc1fe commit b9bfc08
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pandas/tools/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from pandas.compat import range, lzip, zip, map, filter
import pandas.compat as compat

import pandas as pd
from pandas import (Categorical, Series, DataFrame,
Index, MultiIndex, Timedelta)
from pandas.core.frame import _merge_doc
Expand Down Expand Up @@ -40,6 +41,20 @@
import pandas.hashtable as _hash


# back-compat of pseudo-public API
def concat_wrap():

def wrapper(*args, **kwargs):
warnings.warn("pandas.tools.merge.concat is deprecated. "
"import from the public API: "
"pandas.concat instead",
FutureWarning, stacklevel=3)
return pd.concat(*args, **kwargs)
return wrapper

concat = concat_wrap()


@Substitution('\nleft : DataFrame')
@Appender(_merge_doc, indents=0)
def merge(left, right, how='inner', on=None, left_on=None, right_on=None,
Expand Down

0 comments on commit b9bfc08

Please sign in to comment.