]> code.communitydata.science - coldcallbot-discord.git/blobdiff - coldcall.py
don't count folks who were missing
[coldcallbot-discord.git] / coldcall.py
index 4987c741978a1826c4505a74eae90808251f1494..190584453c10253981f4341f5cd13f771c70948a 100644 (file)
@@ -28,7 +28,8 @@ class ColdCall():
             if re.match("call_list-\d{4}-\d{2}-\d{2}.tsv", fn):
                 with open(f"./data/{fn}", 'r') as f:
                     for row in DictReader(f, delimiter="\t"):
-                        previous_questions[row["discord_name"]] += 1
+                        if not row["answered"] == "FALSE":
+                            previous_questions[row["discord_name"]] += 1
 
         return previous_questions
     
@@ -100,7 +101,7 @@ class ColdCall():
 
 # cc = ColdCall()
  
-# test_student_list = ["jordan", "Kristen Larrick", "Madison Heisterman", "Maria.Au20", "Laura (Alia) Levi", "Leona Aklipi", "Linya Feng", "anne", "kirst", "emmaaitelli", "ashleylee", "allie_partridge", "Tiana_Cole", "Hamin", "Ella Qu", "Angel Su", "Shizuka", "Ben Baird", "Kim Do", "Isaacm24", "Sam Bell", "Courtneylg", "TasnimHasan"]
+# test_student_list = ["jordan", "Kristen Larrick", "Madison Heisterman", "Maria.Au20", "Laura (Alia) Levi", "Leona Aklipi", "anne", "emmaaitelli", "ashleylee", "allie_partridge", "Tiana_Cole", "Hamin", "Ella Qu", "Shizuka", "Ben Baird", "Kim Do", "Isaacm24", "Sam Bell", "Courtneylg"]
 # print(cc.coldcall(test_student_list))
 
 # test_student_list = ["jordan", "Kristen Larrick", "Mako"]

Community Data Science Collective || Want to submit a patch?