Add param "name" in resampledata as adddata function has.
-
cerebro.adddata(data, data_name)
vs
cerebro.resampledata(data, timeframe, compression)I currently using Pandas for resampling because of the inexistance of that parameter in resampledata function.
Can it be implemented?
-
@Alejandro-Gutiérrez said in Add param "name" in resampledata as adddata function has.:
Can it be implemented?
AFAIR it is already implemented - take a look at the source code of cerebro.py:
def resampledata(self, dataname, name=None, **kwargs): ''' Adds a ``Data Feed`` to be resample by the system If ``name`` is not None it will be put into ``data._name`` which is meant for decoration/plotting purposes. Any other kwargs like ``timeframe``, ``compression``, ``todate`` which are supported by the resample filter will be passed transparently '''
-
@vladisld said in Add param "name" in resampledata as adddata function has.:
a
Data Feed
to be resample by the system
Ifname
is not None it will be put intodata._name
which is
meant for decoration/plotting purposes.
Any other kwargs liketimeframe
,compression
,todate
which
are supported by the resample filter will be passed transparentlyMy mistake, sorry!