我需要在表的 2 列结构上构建多个过滤器是 7 列,但第一个“查询”和最后一个“模板”正在过滤我以前做过,但现在(一年后)我不知道出了什么问题。for item in glob.glob('D:\\path\\*.change'): table = pd.read_csv(item, sep='\t', index_col=None)#FILTERING filtered_table = table[ (table['query'].str.contains("egg*", regex=True)==False) & (table['query'].str.contains(".*phospho*", regex=True)==False) & (table['query'].str.contains("vipe", regex=True)==False) & (table['template'].str.contains("ABC1")) | (table['template'].str.contains("bender")) ]预期结果是没有包含字符串的行的表 - egg*, 。'query' 列中的phospho、 vipe 和包含 'ABC1' 或 'bender' 的列 'template' 中的行。
添加回答
举报
0/150
提交
取消