Hacker News new | ask | show | jobs
by tfehring 1913 days ago
Using a loop and `if` statements as the book does is unidiomatic, the `replace` function (and the in-place equivalent `replace!`) work as you’d expect. https://docs.julialang.org/en/v1/base/collections/#Base.repl...

If you have a mapping dict defined I think the syntax is just `replace!.(rainData.month, monthMap...)`, not tested though.