title: Count the number of values that satisfy a condition in every column of a Pandas dataframe
body: <p>I have a dataframe with several columns of data.  In the data, a -1 is equivalent to missing data.  I want to count the number of -1 values in each column.  </p>
  
  <p>I believe I could register -1 as a NaN/missing value when I load the data and then I saw something that used isna() and counted boolean values.  However, what I want to do (apply a condition to each column) seems like a fundamental thing I should know how to do, so I would like to figure out how to do it this way.</p>
  
  <p>Here is an example.  Imagine I have the following data frame:</p>
  
  <pre><code>row   A   B  C  D  E
  1     3   5  6  9 -1
  2    -1   3 -1  2  0
  3    -1  -1 -1  1 -1
  </code></pre>
  
  <p>The output I would like to get would be:</p>
  
  <pre><code>A  B  C  D  E
  2  1  2  0  2
  </code></pre>
  
  <p>I have tried the following:</p>
  
  <pre><code>df.apply(lambda x: x == -1).count() # value returned was the count of all the rows
  (df == -1).count() # also returned a count of all the rows.
  </code></pre>
  
  <p>I looked through several questions related to "countif", but they all seemed to apply a condition to one column to select rows.  And the two items I tried above were from questions related to apply functions to each column and count values that match a condition in each column.</p>
  
  <p>The suggested duplicate in the comments is looking for a single value for the entire dataframe and different criteria on each column.  I am looking to apply the same condition to every column and get a result per column, as shown in the selected answer below.</p>
  
  <p>I would appreciate any thoughts or ideas on how to proceed.</p>