1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
"""Pandas官方以及解释 Make a copy of this objects data.
Parameters ---------- deep : boolean or string, default True Make a deep copy, including a copy of the data and the indices. With ``deep=False`` neither the indices or the data are copied.
Note that when ``deep=True`` data is copied, actual python objects will not be copied recursively, only the reference to the object. This is in contrast to ``copy.deepcopy`` in the Standard Library, which recursively copies object data.
Returns ------- copy : type of caller """
__deepcopy__的实际调用是调用 Dataframe.copy的对象(参数deep=True) 当使用深拷贝时,不会递归复制,只有对对象的引用。 与此形成对比的是标准库中的``copy.deepcopy``(真正的深拷贝),递归地复制对象数据。
|