...

/

Solution: Emergency Calls Dataset

Solution: Emergency Calls Dataset

Let’s look at the solutions to the above tasks.

Task 1: Calculating unique townships and titles

Calculate and print the number of unique townships and titles in the data.

Solution

Press + to interact
# Your code here..
print(df['twp'].nunique(), df['title'].nunique())

Explanation

In the code above, we use the nunique() ...