4 ms·
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://
by tfehring 6y 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.replace-Tuple%7BAny,Vararg%7BPair,N%7D%20where%20N%7D 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.