BUG: binary operations don't propogate attrs depending on order with Series and/or DataFrame/Series #51607
Open
Description
Pandas version checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
In [1]: ser1 = pd.Series(range(1))
In [2]: ser2 = pd.Series(range(1))
In [3]: ser1.attrs = {1:2}
In [4]: val = ser2 + ser1
In [5]: val.attrs
Out[5]: {}
Issue Description
val.attrs
should be {1:2}
The relevant tests are xfailed in test_finalize.py::test_binary
Expected Behavior
val.attrs
should be {1:2}
Installed Versions
Replace this line with the output of pd.show_versions()