You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the same issue and just opened a stackoverflow question about it.
The DataFrameattrs (empty in your example) actually seems to overwrite the Seriesattrs.
This seems like a serious bug as not only the result is not correct but also the instance where is copied from gets mutated. Is there any work being planned or done on this?
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Possibly related to:
Code Sample, a copy-pastable example
Problem description
Ideally, when making a copy, the attributes will be preserved on both dataframes.
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 1963b81
python : 3.7.9.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-73-generic
Version : #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.0.dev0+1660.g1963b810b3
numpy : 1.20.1
pytz : 2020.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 49.1.0
Cython : 0.29.23
pytest : 6.2.2
hypothesis : 6.13.0
sphinx : 3.5.4
blosc : 1.10.2
feather : None
xlsxwriter : 1.4.3
lxml.etree : 4.6.2
html5lib : 1.1
pymysql : None
psycopg2 : 2.8.6 (dt dec pq3 ext lo64)
jinja2 : 2.11.3
IPython : 7.20.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 2021.05.0
fastparquet : 0.6.3
gcsfs : 2021.05.0
matplotlib : 3.3.4
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 4.0.0
pyxlsb : None
s3fs : 2021.05.0
scipy : 1.6.0
sqlalchemy : 1.3.23
tables : 3.6.1
tabulate : 0.8.7
xarray : 0.17.1.dev149+g49aa235f.d20210518
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1
The text was updated successfully, but these errors were encountered: