Dropping Rows and Columns with Missing Values
Learn how to drop rows and columns with missing values in a Pandas DataFrame.
We'll cover the following...
The dropna
function
In the previous lesson, we learned how to check the number of missing values in a column or row. The next step is to handle them. We essentially have two options for handling missing values. First, we can drop rows or columns that contain missing values. The dropna
function is used to drop rows and columns with missing values. To use this function accurately and efficiently, we need to first learn its parameters.
The axis
parameter determines if rows or columns with missing values are removed. The default value is zero, which indicates rows. The how
...