BUG: Copy attrs on pd.merge() by timhoffm · Pull Request #60357 · pandas-dev/pandas (original) (raw)

This uses the same logic as pd.concat(): Copy attrs only if all input attrs are identical.

I've refactored the handling in finalize from special-casing based on th the method name (previously only "concat") to handling "other" parameters that have an input_objs attribute. This is a more scalable architecture compared to hard-coding method names in finalize.

Tests added for concat() and merge().

Closes #60351.