Mizuno notes and other items, such as scripts.
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
from collections import Counter
|
||||
import pandas as pd
|
||||
import pandas as pd
|
||||
|
||||
basecsv = "/Users/normrasmussen/Documents/Northpass/Scripts/Skuid_LPs/skuid_05lp.csv"
|
||||
lpcsv = "/Users/normrasmussen/Documents/Northpass/Scripts/Skuid_LPs/skuidlps.csv"
|
||||
basecsv = "/Users/normrasmussen/Documents/Northpass/Scripts/Skuid_LPs/Skuid_MCA125.csv"
|
||||
lpcsv = "/Users/normrasmussen/Documents/Northpass/Scripts/Skuid_LPs/skuidlps2.csv"
|
||||
|
||||
'''
|
||||
"""
|
||||
Example multivalue dictionary
|
||||
|
||||
dict = {key1: [value1, value2, value3, value4],
|
||||
@ -13,39 +13,48 @@ dict = {key1: [value1, value2, value3, value4],
|
||||
|
||||
So this could be used for each learning path. In other words:
|
||||
|
||||
learning_paths = {'01:Skuid Ethos' : ["Congratulations", "Create", "Skuid Resources"]} etc etc
|
||||
learning_paths = {'01:Skuid Ethos' : ["Congratulations", "Create", "Skuid Resources"]} etc etc
|
||||
|
||||
Ideally, we will add Alexa's "levels" in this dictionary as well. Could we do:
|
||||
|
||||
learning_paths = {'Level_1': [{'01:Skuid Ethos' : ["Congratulations", "Create", "Skuid Resources"]},
|
||||
{'02:Composer' : ["Overview", "Get Started with Composer", "Manage Pages"}]
|
||||
{'03:Design System Studio' : ["Get Started with Design Systems", etc etc]},
|
||||
{'03:Design System Studio' : ["Get Started with Design Systems", etc etc]},
|
||||
'Level_2': [{'10 - Data' : ["Tips to Optimize", "Smarter Conditions"]},
|
||||
{'11-Components': ["Battle", "Engage"]},
|
||||
]
|
||||
{'11-Components': ["Battle", "Engage"]},
|
||||
]
|
||||
}
|
||||
|
||||
How to create this by automation?
|
||||
'''
|
||||
"""
|
||||
|
||||
|
||||
def lpLevels(lpcsv):
|
||||
levels = pd.read_csv(
|
||||
lpcsv,
|
||||
index_col=False,
|
||||
)
|
||||
print(levels.Level.unique()) # Print only unique values from the Level column
|
||||
|
||||
lpcsv,
|
||||
index_col=None,
|
||||
header=None,
|
||||
)
|
||||
# print(levels.Level.unique()) # Print only unique values from the Level column
|
||||
|
||||
|
||||
def mainFunc(basecsv):
|
||||
readData = pd.read_csv(
|
||||
basecsv,
|
||||
index_col=False,
|
||||
)
|
||||
readData.drop_duplicates(subset='Course Name', keep="first")
|
||||
emailGroups = readData.groupby("Email")["Course Name"].nunique()
|
||||
print(emailGroups)
|
||||
emailGroups = emailGroups.to_csv('/Users/normrasmussen/Documents/Northpass/Scripts/Skuid_LPs/outtest.csv')
|
||||
#if readData.loc[readData['Course Name'].isin([
|
||||
basecsv,
|
||||
)
|
||||
# lp01 = readData[readData["Course Name"] ==
|
||||
# print(lp01)
|
||||
# people = lp01.groupby(["Email", "Learner Full Name"])["Course Name"].nunique()
|
||||
# print(people)
|
||||
# readData.drop_duplicates(subset="Course Name", keep="first")
|
||||
lvl1 = readData.loc["Course Name"].any()
|
||||
if lvl1.str.contains('Level 1'):
|
||||
emailGroups = readData.groupby(["Email", "Learner Full Name"])["Course Name"].nunique()
|
||||
print(emailGroups)
|
||||
# emailGroups = people.to_csv(
|
||||
# "/Users/normrasmussen/Documents/Northpass/Scripts/Skuid_LPs/outtest2.csv"
|
||||
# )
|
||||
# if readData.loc[readData['Course Name'].isin([
|
||||
# 'Get Started with Models - Level 1',
|
||||
# 'Configure Model Fields - Level 1',
|
||||
# 'Configure Model Conditions - Level 1',
|
||||
@ -55,11 +64,11 @@ def mainFunc(basecsv):
|
||||
# extractedList = readData.loc[readData['Email'].tolist()]
|
||||
# fourOccs = Counter(extractedList)
|
||||
# finalNames = []
|
||||
# for name, occurences in fourOccs.items():
|
||||
# if occurences == 6:
|
||||
# for name, occurrences in fourOccs.items():
|
||||
# if occurrences == 6:
|
||||
# finalNames.append(name)
|
||||
|
||||
if __name__ == "__main__":
|
||||
#mainFunc(basecsv)
|
||||
lpLevels(lpcsv)
|
||||
|
||||
if __name__ == "__main__":
|
||||
mainFunc(basecsv)
|
||||
# lpLevels(lpcsv)
|
||||
|
||||
Reference in New Issue
Block a user