how to find rows with missing data in pandas

null_data = df[df.isnull().any(axis=1)]

Here is what the above code is Doing:
1. df.isnull() returns a dataframe of booleans, where True indicates a missing value.
2. df.isnull().any(axis=1) returns a series of booleans, where True indicates a row with a missing value.
3. df[df.isnull().any(axis=1)] returns a dataframe of rows with missing values.