Null Values
You need to do something about the null values. There are several popular choices when dealing with null values:
- Eliminate the rows: A great approach if null values are a very small percentage, such as 1% of the total dataset.
- Replace with a significant value, such as the median or the mean: A great approach if the rows are valuable, and the column is reasonably balanced.
- Replace with the most likely value, perhaps a 0 or 1: It's preferable to option 2 when the median might be useless. The median can often work here.
Note
mode is the official term for the value that occurs the greatest number of times.
As you can see, which option you choose depends on the data.
Exercise 140: Null Value Operations on the Dataset
In this exercise, you will perform a null value operation. You can only select the columns that have null values in our dataset:
- Open a new Jupyter Notebook and copy the dataset file within a separate folder where you will...