DataFrames.jl icon indicating copy to clipboard operation
DataFrames.jl copied to clipboard

Expose `hcat!` to API

Open pdeffebach opened this issue 4 years ago • 3 comments

Would be nice to have hcat! exposed. I think its useful, especially since the only reason to use hcat is for performance in the first place.

pdeffebach avatar Feb 24 '21 21:02 pdeffebach

Given hcat has copycols kwarg how useful do you think it would really be? (in general I am not opposed to exposing hcat! but just would like to get a clearer perspective of its usefulness)

bkamins avatar Feb 24 '21 22:02 bkamins

I am generally in favor of adding more ! arguments because some times you don't want to think of a new name, or don't want to do everything in a pipe.

pdeffebach avatar Feb 24 '21 23:02 pdeffebach

copycols is fine but it's somewhat confusing because it breaks with the usual conventions followed by Base and DataFrames itself. Typically changes to mutable containers are done with ! functions and do not require re-binding a variable name.

The only concern I have with exporting hcat! is use of the namespace. There could be some other container type that exports it. At the very least, it should be added to DataAPI. Alternatively, it might be nice to document it but not export it.

ExpandingMan avatar Feb 24 '21 23:02 ExpandingMan