def filter_data(csv_file, **kwargs):
f = pd.read_csv(csv_file)
candidate = []
filter = Filter()
filter.install_rule(lambda v: not v['title'].startswith('test'))
for row in f.iterrows():
idx, v = row
item = {
'title': v['title'],
}
if filter.check(item):
candidate.append(item)
return candidate
# If len(candicate) > 0 will send to slack, the text will store as slack_txt_file
评论列表
文章目录