Confusion between doing .copy() and using [[ ]]
Both are more or less the same thing.
xyz = DataFrame[[&quot;col1&quot;]] is useful when you have to select one or more than one column from a dataframe. For example: xyz = DataFrame[[&quot;col1&quot;,&quot;col2&quot;]]
While xyz = DataFrame[&quot;col1&quot;].copy() or df.copy() is used for copying a complete/partial dataframe.
Note that both are exactly the same.