I'm trying to compare two excels, one is the user matrix, the other one is I generated from a host. I want to know if the user settings are correct as of the matrix.
the results I got the from the host, I imported to pandas: the user groups here is as column names!
Name Users Domain Admins Administrators Schema Admins
0 xxx NaN Yes Yes NaN
the problem is :
the excel matrix is like
user: groups
xxx administrators
schema admins
domain admins
here is what I have tried:
I will replace all the Yes with the columns name:
for i in df.columns:
df[i].replace('Yes',i,inplace=True)
remove the null from it.
group=df.dropna(axis='columns',how='all')
now it's like this:
Name Users Domain Admins Administrators Schema Admins
0 xxx Domain admins Administrators Schema Admins
the other one like:
User Account Name Group
0 xxx Domain Admins, Local admin,Administrators
I don't know what to do next. please guide me how to compare the index values in a loop for all the indexs.
the original two excel like this:
user: groups
xxx administrators
schema admins
domain admins
yyy administrators
domain admins
zzz administrators
schema admins
the other file like:
username administrators schema admins domain admins
xxx yes yes NaN
yyy yes NaN yes