# -*- coding: utf-8 -*-

# Author: mojiehua
# Email: mojh@ibbd.net
# Created Time: 2017-07-25 09:54:35

class Transform:
    """
    某个字段的值在列表中，则删除该行数据
    field: 字段名
    配置样例：
    transfrom:
      - type: filter
        name: in
        field: fieldname
        values:
          - value: dropvalue
          - value: dropvalue2
          - value: dorpvalue3
    """

    def __init__(self, config):
        self.field = config['field']
        self.values = [i['value'] for i in config['values']]
        self.config = config
        print(type(self.values[0]))

    def do(self, rows):
        data = []
        for row in rows:
            if row[self.field] not in self.values:
                data.append(row)
        return data

@@ -97,16 +97,17 @@
 :54:35%0A%0A
+%0A
 class Tr
@@ -525,44 +525,8 @@
 nfig
-%0A        print(type(self.values%5B0%5D))
 %0A%0A  
@@ -674,16 +674,17 @@
 nd(row)%0A
+%0A
         

fix print