title: Conditional filtering of pandas data frame
body: <p>I have a pandas data frame about football results. Each row of the dataframe represents a football match. The information of each match are: </p>
  
  <pre><code>Day | WinningTeamID | LosingTeamID | WinningPoints | LosingPoints | WinningFouls | ... | 
  1          13             1              45                5               3  
  1          12             4              21                12              4              
  </code></pre>
  
  <p>That is, the information are divided based on the game result: winning or losing. 
  I would like to retrieve the data of each game for a specific team (e.g. 12). </p>
  
  <pre><code>Day | Points | Fouls | ... | 
  1       21       4     ...
  2       32       6     ...
  </code></pre>
  
  <p>The simplest way is to scan the whole dataframe, check if a specific teamID is on <strong>WinningID</strong> or <strong>LosingID</strong> and then, based on that, retrieve the "<em>Losing-columns</em>" or the "<em>Winning-columns</em>".
  Is there a more "elegant" way of slicing the pandas dataframe?
  This will simply give me the subset of matches where the team 12 is involved.</p>
  
  <pre><code>df[df[WinningTeamID == 12] | [LosingTeamID == 12]]
  </code></pre>
  
  <p>How can I filter those data and create the desired dataframe?</p>