Closed scls19fr closed 5 years ago
What would be involved?
it could reduce the number of exported functions and provide an API quite similar to Python Pandas and have a kind of object oriented API (by using multiple dispatch)
See https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.rolling.html
An other feature that could be provide could be to also have expanding functions.
For example we have cumsum
and cumprod
in Base but not neither cummax
nor cummin
https://github.com/JuliaLang/julia/issues/1649
So a similar approach could be done with expanding functions See https://github.com/JuliaLang/julia/issues/1649#issuecomment-504539648
your mean(rolling(data, windowsize))
is my rolling(mean, data, windowsize)
rollmean(data, windowsize)
is just a convenience for rolling(mean, data, windowsize)
It wouldn't really reduce the number of exported functions .. I could simply not export the rollmean
etc and force the user to use rolling(mean, data, windowsize)
.. also, more importantly, I would have to overload mean
and all the others which may cause interoperability issues with other packages down the line (or today).
FYI the general approach was (no disrespect to Pandas) inspired by functions and libs I had used with R.
Adding cummax
cummin
etc seems like a good idea.
cummin
and cummax
have been deprecated in favor of accumulate
https://github.com/JuliaLang/julia/blob/480703b9d770f82202b8a6daf0b3414fc7e9fad9/HISTORY.md
ok -- thank you for the note
Hello,
I wonder if
or with piping operator
couldn't be an interesting API
What is your opinion?
Kind regards