Question: Using the generalize function, generalize the Age and Zip columns of the adult dataset in order to achieve k-Anonymity for k = 5. Your


Using the generalize function, generalize the Age and Zip columns of theadult dataset in order to achieve k-Anonymity for k = 5. Your

Using the generalize function, generalize the Age and Zip columns of the adult dataset in order to achieve k-Anonymity for k = 5. Your result should drop other columns besides these two. In [ ]: def generalize_adult_age_zip(): depths = { # YOUR CODE HERE In [ ]: In []: H In [ ]: H raise NotImplementedError() } return generalize(adult[['Age', 'Zip']], depths) assert is_k_anonymous (5, ['Age', 'Zip'], generalize_adult_age_zip()) In []: #Load the data and Libraries import pandas as pd. import numpy as np. pd.read_csv('https://github.com/jnear/cs211-data-privacy/raw/master/homework/adult_with_pii.csv) adult = adult pii adult_deid = adult [['Name', 'DOB', 'SSN', 'Zip', 'Age']] = adult.drop(columns=['Name', 'SSN'])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!