Small CS Ops script to understand how many hours we have been spending on implementation.
This commit is contained in:
@ -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:]
|
||||
|
||||
Reference in New Issue
Block a user