You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rolling windows API is not coherent to scipy.signal API.
Describe the solution you'd like
Support for weighted rolling window functions in pandas is based on scipy.signal. Precisely, pandas uses scipy.signal.get_window in order to get weights for a specific window specification. The issue is that scipy allows more accurate window specification. Namely, one can use non-symetric exponential window as following.
Moreover, pandas API specification requires paramter tau what is not necesaray in fact. So, API could be even simpler.
A possible solution to use win_type in order togetattrib of scipy.signal.windows module. If there is a function named as win_type then pandas should invoke the function with all passed paramters to aggregation function over rolling window. In the snippet below, .sum() implies invocation of scipy.signal.windows.exponential(2, sym=False).
API won't be broken. However, I would like to relax some contraints. Namely, aggregations over rolling window should be calculated without explicit window parameter specification.
Describe alternatives you've considered
Alternative solution looks like the following. It is simple and a bit verbose.
Is your feature request related to a problem?
Rolling windows API is not coherent to
scipy.signal
API.Describe the solution you'd like
Support for weighted rolling window functions in
pandas
is based onscipy.signal
. Precisely,pandas
usesscipy.signal.get_window
in order to get weights for a specific window specification. The issue is thatscipy
allows more accurate window specification. Namely, one can use non-symetric exponential window as following.Moreover,
pandas
API specification requires paramtertau
what is not necesaray in fact. So, API could be even simpler.A possible solution to use
win_type
in order togetattrib
ofscipy.signal.windows
module. If there is a function named aswin_type
thenpandas
should invoke the function with all passed paramters to aggregation function over rolling window. In the snippet below,.sum()
implies invocation ofscipy.signal.windows.exponential(2, sym=False)
.API breaking implications
API won't be broken. However, I would like to relax some contraints. Namely, aggregations over rolling window should be calculated without explicit window parameter specification.
Describe alternatives you've considered
Alternative solution looks like the following. It is simple and a bit verbose.
The text was updated successfully, but these errors were encountered: