diff --git a/doc/source/release.rst b/doc/source/release.rst index 4291ed1b6c357..fac584eb2cba4 100644 --- a/doc/source/release.rst +++ b/doc/source/release.rst @@ -90,6 +90,7 @@ Bug Fixes - ``HDFStore.remove`` now handles start and stop (:issue:`6177`) - ``HDFStore.select_as_multiple`` handles start and stop the same way as ``select`` (:issue:`6177`) - ``HDFStore.select_as_coordinates`` and ``select_column`` works where clauses that result in filters (:issue:`6177`) +- Regression in join of non_unique_indexes (:issue:`6329`) pandas 0.13.1 ------------- diff --git a/pandas/core/ops.py b/pandas/core/ops.py index a0e274b952817..3bd4b9ee4d16c 100644 --- a/pandas/core/ops.py +++ b/pandas/core/ops.py @@ -476,16 +476,15 @@ def wrapper(left, right, name=name): wrap_results = time_converted.wrap_results if isinstance(rvalues, pd.Series): - join_idx, lidx, ridx = left.index.join(rvalues.index, how='outer', - return_indexers=True) - rindex = rvalues.index + rindex = getattr(rvalues,'index',rvalues) name = _maybe_match_name(left, rvalues) lvalues = getattr(lvalues, 'values', lvalues) rvalues = getattr(rvalues, 'values', rvalues) if left.index.equals(rindex): index = left.index else: - index = join_idx + index, lidx, ridx = left.index.join(rindex, how='outer', + return_indexers=True) if lidx is not None: lvalues = com.take_1d(lvalues, lidx) diff --git a/vb_suite/join_merge.py b/vb_suite/join_merge.py index 0ff0578313548..aa883443f7d9d 100644 --- a/vb_suite/join_merge.py +++ b/vb_suite/join_merge.py @@ -202,3 +202,23 @@ def sample(values, k): """ stmt = "ordered_merge(left, right, on='key', left_by='group')" + +#---------------------------------------------------------------------- +# outer join of non-unique +# GH 6329 + +setup = common_setup + """ +date_index = pd.date_range('01-Jan-2013', '23-Jan-2013', freq='T') +daily_dates = date_index.to_period('D').to_timestamp('S','S') +fracofday = date_index.view(np.ndarray) - daily_dates.view(np.ndarray) +fracofday = fracofday.astype('timedelta64[ns]').astype(np.float64)/864e11 +fracofday = pd.TimeSeries(fracofday, daily_dates) +index = pd.date_range(date_index.min().to_period('A').to_timestamp('D','S'), + date_index.max().to_period('A').to_timestamp('D','E'), + freq='D') +temp = pd.TimeSeries(1.0, index) +""" + +join_non_unique_equal = Benchmark('fracofday * temp[fracofday.index]', setup, + start_date=datetime(2013 1, 1)) +