How to make a copy of a data frame in Python Pandas?

To make a copy of a data frame in Python Pandas, we can use the copy method.

For instance, we write

df2 = df.copy()

to make a copy of the df data frame with copy and assign the copied data frame to df2.