Missing Data — Displaying Rows with Missing Data From a Specific Column
Jul 5, 2022
Previously, we have discussed numerous ways to identify missing data from a data set. You may do a top level analysis and call the .info() method on the data frame. You may even display the total missing records for each column by chaining the methods .isna().sum() to the data frame. But what if you wanted to display the rows that are missing an item from a specific column? For this you, you can use: df.loc[df[‘desiredColumn’].isna()]
Above I checking out all records in my data frame that are missing values in the ‘Grade Level Equiv’ column.
From there you can continue you investigation into the missing data — happy investigating!