<human>:  Best way to count the number of rows with missing values in a pandas DataFrame
<bot>: Here is some code to count the number of rows with missing values in a pandas dataframe `df`

sum(df.apply(lambda x: sum(x.isnull().values), axis=1) > 0)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.