everybody.I need to anonymize the raw table to make a anonymized table. In another word, I need to replace the non_ duplicated sets with stars.
Actually, I have run this code:
for j in range(len(zz_new)):
for i in range(len(zz)):
if zz_new.iloc[j][0] != zz.iloc[i][0]:
zz_new.iat[j,0]="*"
if zz_new.iloc[j][1] != zz.iloc[i][1]:
zz_new.iat[j,1]="*"
if zz_new.iloc[j][2] != zz.iloc[i][2]:
zz_new.iat[j,2]="*"
if zz_new.iloc[j][3] != zz.iloc[i][3]:
zz_new.iat[j,3]="*"
if zz_new.iloc[j][4] != zz.iloc[i][4]:
zz_new.iat[j,4]="*"
, but the result is like this My anonymized table. I was wondering if you could help me to reach the anonymized table.
Use the value_counts() method: