ENH: sid and field filter kwargs can also be strings or ints.

This commit is contained in:
Thomas Wiecki
2012-12-20 11:58:23 -05:00
parent b815a57430
commit a63d4bca28
+6 -2
View File
@@ -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