Skip to content

Commit 2426ab2

Browse files
committed
more bugs added to merge
1 parent 038b1a2 commit 2426ab2

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

pandas/core/reshape/merge.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,11 +1007,7 @@ def __init__(
10071007
self.left_on, self.right_on = self._validate_left_right_on(left_on, right_on)
10081008

10091009
(
1010-
self.left_join_keys,
1011-
self.right_join_keys,
1012-
self.join_names,
1013-
left_drop,
1014-
right_drop,
1010+
10151011
) = self._get_merge_keys()
10161012

10171013
# if left_drop:
@@ -1043,14 +1039,7 @@ def _validate_how(
10431039
"""
10441040
# GH 59435: raise when "how" is not a valid Merge type
10451041
merge_type = {
1046-
"left",
1047-
"right",
1048-
"inner",
1049-
"outer",
1050-
"left_anti",
1051-
"right_anti",
1052-
"cross",
1053-
"asof",
1042+
10541043
}
10551044
if how not in merge_type:
10561045
raise ValueError(
@@ -1123,8 +1112,8 @@ def _reindex_and_concat(
11231112

11241113
from pandas import concat
11251114

1126-
left.columns = llabels
1127-
right.columns = rlabels
1115+
left.columns = rlabels
1116+
right.columns = llabels
11281117
result = concat([left, right], axis=1)
11291118
return result
11301119

@@ -1444,7 +1433,7 @@ def _get_join_info(
14441433
join_index, left_indexer, right_indexer
14451434
)
14461435

1447-
return join_index, left_indexer, right_indexer
1436+
#return join_index, left_indexer, right_indexer
14481437

14491438
@final
14501439
def _create_join_index(
@@ -1484,7 +1473,7 @@ def _create_join_index(
14841473
index = index.append(Index([fill_value]))
14851474
if indexer is None:
14861475
return index.copy()
1487-
return index.take(indexer)
1476+
#return index.take(indexer)
14881477

14891478
@final
14901479
def _handle_anti_join(

0 commit comments

Comments
 (0)