xKDR / TSFrames.jl

Timeseries in Julia
MIT License
91 stars 22 forks source link

Do we use `deepcopy()` when `copycols=true` in the constructor #146

Open chiraganand opened 1 year ago

chiraganand commented 1 year ago

PR #142 adds a keyword argument for the user to specify whether to copy the columns or not. Since the package does not have any in-place modification methods is deepcopy really needed at this moment?

asinghvi17 commented 1 year ago

The package doesn't do anything in place, but the user might - the reason I included this was so that if I want to mutate my dataframe afterwards, I can ensure that that mutation doesn't affect the TSFrame by passing copycols = true.

It's a point for discussion. My understanding is that DataFrames does the same thing, so there is an argument for mirroring its behaviour in this case.