title: Pandas print missing value column names and count only
body: <p>I am using the following code to print the missing value count and the column names. </p>
  
  <pre><code>#Looking for missing data and then handling it accordingly
  def find_missing(data):
  # number of missing values
  count_missing = data_final.isnull().sum().values
  # total records
  total = data_final.shape[0]
  # percentage of missing
  ratio_missing = count_missing/total
  # return a dataframe to show: feature name, # of missing and % of missing
  return pd.DataFrame(data={'missing_count':count_missing, 'missing_ratio':ratio_missing}, 
  index=data.columns.values)
  find_missing(data_final).head(5)
  </code></pre>
  
  <p>What I want to do is to only print those columns where there is a missing value as I have a huge data set of about 150 columns.</p>
  
  <p>The data set looks like this </p>
  
  <pre><code>A     B      C      D
  123   ABC    X      Y
  123   ABC    X      Y
  NaN   ABC    NaN   NaN
  123   ABC    NaN   NaN
  245   ABC    NaN   NaN
  345   ABC    NaN   NaN
  </code></pre>
  
  <p>In the output I would just want to see :</p>
  
  <pre><code>     missing_count   missing_ratio
  C    4               0.66
  D    4               0.66
  </code></pre>
  
  <p>and not the columns A and B as there are no missing values there</p>