-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: Copy attrs on pd.merge() #60357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
7815e73
2db541a
a9de220
dfbde9b
13b4ee5
bd4438a
829714b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
) | ||
import datetime | ||
from functools import partial | ||
import types | ||
from typing import ( | ||
TYPE_CHECKING, | ||
Literal, | ||
|
@@ -1106,7 +1107,10 @@ def get_result(self) -> DataFrame: | |
join_index, left_indexer, right_indexer = self._get_join_info() | ||
|
||
result = self._reindex_and_concat(join_index, left_indexer, right_indexer) | ||
result = result.__finalize__(self, method=self._merge_type) | ||
result = result.__finalize__( | ||
types.SimpleNamespace(input_objs=[self.left, self.right]), | ||
method=self._merge_type, | ||
) | ||
Comment on lines
+1138
to
+1141
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: I don't really understand why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if we just remove this |
||
|
||
if self.indicator: | ||
result = self._indicator_post_merge(result) | ||
|
@@ -1115,7 +1119,9 @@ def get_result(self) -> DataFrame: | |
|
||
self._maybe_restore_index_levels(result) | ||
|
||
return result.__finalize__(self, method="merge") | ||
return result.__finalize__( | ||
types.SimpleNamespace(input_objs=[self.left, self.right]), method="merge" | ||
) | ||
|
||
@final | ||
@cache_readonly | ||
|
Uh oh!
There was an error while loading. Please reload this page.