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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Operations Management Creating Value Along the Supply Chain
Authors: Roberta S. Russell, Bernard W. Taylor
7th Edition
9781118139523, 0470525908, 1118139526, 978-0470525906
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App