pandas.DataFrame.copy

pandas 3.1.1 · DataFrame · method

Make a copy of the receiver. For an HDFStore, copy stored data to a different file.

Call syntax

DataFrame.copy(deep=True)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
deep Optional
Positional or keyword
Default True
bool

Choose whether to include or copy underlying object data where supported.

Returns

Series or DataFrame