dysonance / Temporal.jl

Time series implementation for the Julia language focused on efficiency and flexibility
Other
100 stars 25 forks source link

rename columns name using a function #23

Closed femtotrader closed 5 years ago

femtotrader commented 6 years ago

Following https://github.com/dysonance/Temporal.jl/issues/20#issuecomment-363834526

A rename! function implementation could also accept a function as 2nd parameter which could rename column name in place.

Something like

rename!(data, c->replace(c, " ", ""))

Although TS column names are Symbol... not String so it will become

rename!(data, c->Symbol(replace(String(c), " ", "")))

but I'd prefer the Symbol/String complexity be hidden.