Skip to content
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -6038,7 +6038,12 @@ def __finalize__(self, other, method: str | None = None, **kwargs) -> Self:
if all(bool(obj.attrs) for obj in objs):
# all concatenate arguments have non-empty attrs
attrs = objs[0].attrs
have_same_attrs = all(obj.attrs == attrs for obj in objs[1:])
have_same_attrs = all(
(obj.attrs == attrs).all()
if isinstance(obj.attrs, np.ndarray)
else obj.attrs == attrs
for obj in objs[1:]
)
if have_same_attrs:
self.attrs = deepcopy(attrs)

Expand Down