Small CS Ops script to understand how many hours we have been spending on implementation.

This commit is contained in:
Norm Rasmussen
2023-12-11 16:54:17 -05:00
parent 1d8a2e6f2b
commit b35a650a11
5 changed files with 34 additions and 2 deletions

View File

@ -4,7 +4,7 @@ from pathlib import Path
import Apikeys
import os
basefile = "/Users/normrasmussen/Downloads/TS1099-coursecompletions.csv"
basefile = "/Users/normrasmussen/Downloads/ts-mca.csv"
api_key = Apikeys.TALKSPACE_1099
uuid_url = "https://api.northpass.com/v2/people?filter[email][eq]="
prop_url = "https://api.northpass.com/v2/properties/people/"
@ -26,7 +26,7 @@ def load_file(basefile):
for email in completions.itertuples():
row_num = email[1]
row_dict = {"row_num": row_num}
email = email[4]
email = email[3]
url = uuid_url + f"{email}"
response = requests.get(url, headers=headers)
if response.status_code == 200:
@ -45,6 +45,7 @@ def load_file(basefile):
for info in dict_list:
row = info["row_num"]
pid = info["userid"]
print(f"PID IS {pid}")
completions.loc[completions.index[row], "userid"] = pid
completions = completions[completions["userid"] != "0"]
# completions = completions.iloc[:, 0:]