Closed femtotrader closed 6 years ago
function rename!(f::Base.Callable, data::TS)
end
where f
is a function
Symbol
) as input and Symbol
for new column namemight also be implemented
Supporting multiple Pair{Symbol,Symbol}
instead of Dict{Symbol, Symbol}
is an other possible approach.
rename!(data, :Open => :Open2, :Close => :Close2)
It seems to be the kind of API Julia base replace
function should be going.
If replacement is in a Dict it can be done using
rename!(data, Dict(:Open => :Open2, :Close => :Close2)...)
Hello,
A
rename!
function which rename several columns name using a Dict of Symbols or a column name using 2 Symbols (from_name, to_name) or a Pair of Symbol could probably be an interesting feature to haveSee https://github.com/dysonance/Temporal.jl/issues/20#issuecomment-356232253
Kind regards
PS :
Such a
rename!
function could be implemented like this:rename!
could also acceptPair{Symbol, Symbol}
or 2 symbols as parameter