CommencerCommencer gratuitement

Explore the distribution of data

When we want to anonymize a dataset by sampling data in a very realistic way, we need to acquire some domain and statistical knowledge of the data. As we have seen, finding the probability distribution of the column of interest is key.

In this exercise, you will explore the column business_travel from a simplified version of the IBM HR dataset.

The DataFrame has been imported as hr and numpy as np. As said in the previous chapter, pandas has been imported as pd for this and the rest of the course.

Cet exercice fait partie du cours

Data Privacy and Anonymization in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Print the absolute frequencies of each unique value
print(____)
Modifier et exécuter le code