title: How to extract rows with the given sequence of values for 2 subsequent columns?
body: <p>How can I find the sequence of values <code>AAA</code>, <code>BBB</code> among columns <code>COL_1</code>, <code>COL_2</code>, <code>COL_3</code>, ....,<code>COL_X</code> (where <code>X</code> is some number, e.g. 200, so enumeration is not a good solution)?</p>
  
  <p>For example, if there is a dataframe <code>df</code>, then the row 1 and 4 should be the output:</p>
  
  <pre><code>df=
  ID    COL_1   COL_2   COL_3   COL_4
  1     AAA     BBB     CCC     DDD
  2     DDD     AAA     CCC     BBB
  3     BBB     AAA     DDD     CCC
  4     CCC     AAA     BBB     DDD
  </code></pre>