# from django.test import TestCase import os # create your tests here. base_dir = os.getcwd() print("base_dir: " + base_dir) model_dir = os.path.join(base_dir, "_models") data_dir = os.path.join(base_dir, "_data") if __name__ == "__main__": id1 = ["202647", "386735"] # 下颚角 9/1252645 id2 = ["87874", "84198"] # 双眼皮 95 with open(os.path.join(data_dir, "click_tractate_ids.csv"), "r") as f: data = f.readlines() count = 0 id1_count = 0 id2_count = 0 for i in data: print(count) count += 1 tmp = i.split("|") device_id = tmp[0] ids = tmp[1].rstrip("\n").split(",") if id1[0] in ids and id1[1] in ids: id1_count += 1 if id2[0] in ids and id2[1] in ids: id2_count += 1 print("done") print(count, id1_count, id2_count)