Files
Gainsight/Scripts/G2_Unenroll/fix_unenroll.py
2022-11-08 14:47:53 -05:00

52 lines
1.6 KiB
Python

import requests
import os
from datetime import date
import pandas as pd
basecsv = "/Users/normrasmussen/Documents/Northpass/Scripts/G2_Unenroll/g2mca.csv"
def mainFunc(basecsv):
readData = pd.read_csv(
basecsv,
index_col=False,
)
try:
readData.loc[
readData['Course Name'].isin(['G2 Profile Anatomy'])]
try:
readData.loc[
readData['Course Name'].isin('Profile Performance & Lead Management')]
except:
print("Profile Course Failed")
try:
readData.loc[
readData['Course Name'].isin('Review Tracking & Brand Building')]
except:
print("Review Course Failed")
try:
readData.loc[
readData['Course Name'].isin('The Review Rundown')]
extractedList = readData.loc[
readData['Attempt Start'].isnull(),
'Learner Name'].tolist()
print(extractedList)
except:
print("Review Rundown failed")
# newList = [*set(extractedList)]
#findUuids(newList, readData)
except:
print("Not Working")
#def findUuids(newList, readData):
# try:
# for name in newList:
# uuidList = readData.loc[
# readData['Learner Name'] == name),
# 'uuid'.tolist()]
# print(uuidList)
# except:
# print("An error occured")
if __name__ == "__main__":
mainFunc(basecsv)