title: Count number of rows with NaN in a pandas DataFrame?
body: <p>Having the following running code:</p>
  
  <pre><code>import datetime as dt
  import pandas as pd
  import matplotlib.pyplot as plt
  from sklearn.linear_model import LinearRegression
  
  my_funds = [1, 2, 5, 7, 9, 11]
  my_time = ['2020-01', '2019-12', '2019-11', '2019-10', '2019-09', '2019-08']
  df = pd.DataFrame({'TIME': my_time, 'FUNDS':my_funds})
  
  for x in range(2,3):
      df.insert(len(df.columns), f'x**{x}', df["FUNDS"]**x)
  
  df = df.replace([1, 7, 9, 25],float('nan'))
  
  print(df.isnull().values.ravel().sum())   #5 (obviously counting NaNs in total)
  print(sum(map(any, df.isnull())))         #3 (I guess counting the NaNs in the left column)
  </code></pre>
  
  <p>I am getting the dataframe below. I want to get <strong>the count of the total rows</strong>, with 1 or more NaN, which in my case is <strong>4</strong>,  on rows - <code>[0, 2, 3, 4]</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/e3UnA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e3UnA.png" alt="enter image description here"></a></p>