Why are attributes lost after copying a Pandas DataFrame

前端 未结 4 1617
野的像风
野的像风 2021-02-19 02:07

Why is it not possible to pass attributes of an instance through a copy? I want to pass the name attribute to another dataframe.

import copy
df = pd         


        
4条回答
  •  轮回少年
    2021-02-19 02:09

    Attaching custom metadata to DataFrames seems to be unsupported for pandas. See this answer (possible duplicate?) and this github issue.

提交回复
热议问题