title: how to transform a df by combing 2 fields
body: <p>i have a dataframe, and I would like to transform it to another df with all unique combination of 2 fields.</p>
  <p>now i can achieve with some bulky for loops but guess there should be pandas native way to achive it?</p>
  <p>thanks</p>
  <pre><code>df = pd.DataFrame({'A' : ['A','B','C','D','E','F','G','H','I'],
                     'B' : ['B','C','D','E','F','G','H','I','J'],
                     'C' : ['C','D','E','F','G','H','I','J','J'],
                     'D' : ['D','E','F','G','H','I','J','J','J'],
                     'E' : ['E','F','G','H','I','J','A','B','C'],
                     'F' : ['B','C','D','B','C','D','B','C','D'],
                    })
  list = ['A','B','C','D']
  for a in df.A.unique():
      for b in list:
          res = df[(df.A==a) &amp; (df.B==b)]
          if (len(res)&gt;0):
              fi = res.iloc[0]
              print('{}:{},{},{},{},{},{},{}'.format(a,b,fi.C,fi.D,fi.E,fi.F,'found',str(len(res))))
          else:
              print('{}:{},,,,,{},{}'.format(a,b,'empty',str(len(res))))
  </code></pre>
  <p>expected results but in df</p>
  <pre><code>A:A,,,,,empty,0
  A:B,C,D,E,B,found,1
  A:C,,,,,empty,0
  A:D,,,,,empty,0
  B:A,,,,,empty,0
  B:B,,,,,empty,0
  B:C,D,E,F,C,found,1
  B:D,,,,,empty,0
  C:A,,,,,empty,0
  C:B,,,,,empty,0
  C:C,,,,,empty,0
  C:D,E,F,G,D,found,1
  D:A,,,,,empty,0
  D:B,,,,,empty,0
  D:C,,,,,empty,0
  D:D,,,,,empty,0
  E:A,,,,,empty,0
  E:B,,,,,empty,0
  E:C,,,,,empty,0
  E:D,,,,,empty,0
  F:A,,,,,empty,0
  F:B,,,,,empty,0
  F:C,,,,,empty,0
  F:D,,,,,empty,0
  G:A,,,,,empty,0
  G:B,,,,,empty,0
  G:C,,,,,empty,0
  G:D,,,,,empty,0
  H:A,,,,,empty,0
  H:B,,,,,empty,0
  H:C,,,,,empty,0
  H:D,,,,,empty,0
  I:A,,,,,empty,0
  I:B,,,,,empty,0
  I:C,,,,,empty,0
  I:D,,,,,empty,0
  </code></pre>