mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-29 23:23:34 +08:00
ENH: sid and field filter kwargs can also be strings or ints.
This commit is contained in:
@@ -380,6 +380,12 @@ class BatchTransform(EventWindow):
|
||||
self.clean_nans = clean_nans
|
||||
|
||||
self.sids = sids
|
||||
if isinstance(self.sids, (str, int)):
|
||||
self.sids = [self.sids]
|
||||
|
||||
self.field_names = fields
|
||||
if isinstance(self.field_names, str):
|
||||
self.field_names = [self.field_names]
|
||||
|
||||
self.refresh_period = refresh_period
|
||||
self.window_length = window_length
|
||||
@@ -392,8 +398,6 @@ class BatchTransform(EventWindow):
|
||||
self.updated = False
|
||||
self.cached = None
|
||||
|
||||
self.field_names = fields
|
||||
|
||||
def handle_data(self, data, *args, **kwargs):
|
||||
"""
|
||||
New method to handle a data frame as sent to the algorithm's
|
||||
|
||||
Reference in New Issue
Block a user