BaşlayınÜcretsiz Başlayın

K-anonymizing a dataset

In this exercise, you will anonymize the NBA Salaries dataset. Remember, you need to specify attribute types to apply k-anonymity. These can be identifying, quasi-identifying, sensitive, or insensitive. We'll focus on age and nba_origin to be Quasi-identifying and salary as sensitive data.

Explore nba. If you know information about a player, like that he/she's from Spain and is 23, then you will know sensitive information like his/her salary! Here, we'll use a K-value of 3, ensuring that the chosen attributes cannot be distinguished with at least k-1 other rows.

The hierarchy dictionary for nba_Origin is already created as origin_hierarchy.

Bu egzersiz

Data Privacy and Anonymization in Python

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Print how many unique combinations are for age and nba_origin
print(____)
Kodu Düzenle ve Çalıştır