I am trying to call a function but with no success the target is to run rules for examination of segregation of duties
per=pd.read_excel('Permissionwp.xlsx',sheet_name='Sheet1')
def take_first(elem):
return elem[0]
def sod(permissiona,permissionb):
rsod=[]
ls1=[]
ls2=[]
for i in range(len(per)):
if per.iloc[i,5]==permissiona:
ls1.append((per.iloc[i,1],per.iloc[i,4]))
else:
pass
for i in range(len(per)):
if per.iloc[i,5]==permissionb:
ls2.append((per.iloc[i,1],per.iloc[i,4]))
else:
pass
for user in ls1:
if user in ls2:
rsod.append(user)
rsod=list(set(rsod))
for i in sorted(rsod,key=take_first):
print(i)
the problem is below- I am trying to call to sod function by running rules file using the sod is not bringing me the result rather "None"
l=()
count=0
risk=pd.read_excel('risk.xlsx',sheet_name='Sheet1')
for num in range(len(risk)):
sod(risk.iloc[num,4],risk.iloc[num,5])
here is the problem