I currently came up with some work arounds to count the number of missing values in a pandas `DataFrame`. Those are quite ugly and I am wondering if there is a better way to do it.

Let's create an example `DataFrame`:

```
from numpy.random import randn
df = pd.DataFrame(randn(5, 3), index=['a', 'c', 'e', 'f', 'h'],
               columns=['one', 'two', 'three'])
df = df.reindex(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])

```

![enter image description here](https://i.stack.imgur.com/PiluQ.png)

What I currently have is

a) Counting cells with missing values:

```
>>> sum(df.isnull().values.ravel())
9

```

b) Counting rows that have missing values somewhere:

```
>>> sum([True for idx,row in df.iterrows() if any(row.isnull())])
3

```