title: How to iterate over columns and check condition by group
body: <p>I have data for many countries over a period of time (2001-2003). It looks something like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>index</th>
  <th>year</th>
  <th>country</th>
  <th>inflation</th>
  <th>GDP</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>2001</td>
  <td>AFG</td>
  <td>nan</td>
  <td>48</td>
  </tr>
  <tr>
  <td>2</td>
  <td>2002</td>
  <td>AFG</td>
  <td>nan</td>
  <td>49</td>
  </tr>
  <tr>
  <td>3</td>
  <td>2003</td>
  <td>AFG</td>
  <td>nan</td>
  <td>50</td>
  </tr>
  <tr>
  <td>4</td>
  <td>2001</td>
  <td>CHI</td>
  <td>3.0</td>
  <td>nan</td>
  </tr>
  <tr>
  <td>5</td>
  <td>2002</td>
  <td>CHI</td>
  <td>5.0</td>
  <td>nan</td>
  </tr>
  <tr>
  <td>6</td>
  <td>2003</td>
  <td>CHI</td>
  <td>7.0</td>
  <td>nan</td>
  </tr>
  <tr>
  <td>7</td>
  <td>2001</td>
  <td>USA</td>
  <td>nan</td>
  <td>220</td>
  </tr>
  <tr>
  <td>8</td>
  <td>2002</td>
  <td>USA</td>
  <td>4.0</td>
  <td>250</td>
  </tr>
  <tr>
  <td>9</td>
  <td>2003</td>
  <td>USA</td>
  <td>2.5</td>
  <td>280</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to drop countries in case there is no data (i.e. values are missing for all years) for any given variable.</p>
  <p>In the example table above, I want to drop AFG (because it misses all values for inflation) and CHI (GDP missing). I <strong>don't want</strong> to drop observation #7 just because one year is missing.</p>
  <p>What's the best way to do that?</p>