Reputation: 101
I read the following about the copy-parameter in pandas.concat function documentation:
copy: bool, default True
If False, do not copy data unnecessarily.
Questions:
True
)copy=False
?Upvotes: 8
Views: 2641
Reputation: 24322
well see there are 2 type of copies in python
1.Deep copy
2.Shallow Copy
so basically the copy parameter in pd.concat()
defines the same by default it creates a deep copy
but if you overwrite its value by False
it creates Shallow copy
Note:-In deep copy
a exact copy is created so if you make any changes in original variable it doesn't reflect in your copy but in shallow copy
it reflect in your copy because in shallow copy
the data is referencing to original data
Upvotes: 7