I tried paste the code but it was hard to read. You can search Histograms in this page https://datasciencejuliahackers.com/03_probability_intro.jl....
I tried paste the code but it was hard to read. You can search Histograms in this page https://datasciencejuliahackers.com/03_probability_intro.jl....
Did you have a more specific question about mapping or iteration in Julia?
If you have a mapping dict defined I think the syntax is just `replace!.(rainData.month, monthMap...)`, not tested though.
[sin(x) for x in vec]
map(sin, vec)
sin.(vec)
which are roughly equivalent? Is that what you're referring to? rainData.month = map(mth -> myEsEnDict[mth], rainData.month)
[1] https://syl1.gitbook.io/julia-language-a-concise-tutorial/us...There are quite a lot of different ways of mapping in Julia, including functions like `map`, `mapreduce`, `replace`, and various syntaxes for broadcasting and array comprehensions.
For maximum SIMD performance there are also things like `vmap` and `vmapreduce` from LoopVectorization.jl.
One of the other commenters also mentioned the `replace` function, which could be used in place of a loop.