title: Pandas fill NaN in columns based on some conditions
body: <p>I have a pandas dataframe which consists of weekly values for a given id, looking something like :</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>val_week1</th>
  <th>val_week2</th>
  <th>val_week3</th>
  <th>val_week4</th>
  <th>val_week5</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>0</td>
  <td>0</td>
  <td>3</td>
  <td>2</td>
  <td>0</td>
  </tr>
  <tr>
  <td>2</td>
  <td>1</td>
  <td>0</td>
  <td>0</td>
  <td>2</td>
  <td>3</td>
  </tr>
  <tr>
  <td>3</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to fill some column values as NaN. The condition here is that all values for an id, until the first non-zero value in each row must be NaN. So data-frame should look like this after the transformation :</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>val_week1</th>
  <th>val_week2</th>
  <th>val_week3</th>
  <th>val_week4</th>
  <th>val_week5</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>NaN</td>
  <td>NaN</td>
  <td>3</td>
  <td>2</td>
  <td>0</td>
  </tr>
  <tr>
  <td>2</td>
  <td>1</td>
  <td>0</td>
  <td>0</td>
  <td>2</td>
  <td>3</td>
  </tr>
  <tr>
  <td>3</td>
  <td>NaN</td>
  <td>NaN</td>
  <td>NaN</td>
  <td>NaN</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I am trying to approach this by extracting the first non-zero value column for each row, and then all values prior to it can be filled as NaN. But I am not able to figure out how exactly could it be done using pandas, as I am new to it.<br />
  Any help would be appreciated.</p>