title: Find most frequant values with Pig
body: <p>I have the following data set:</p>
  
  <pre><code>dump DATA_INPUT;
       (0000001686601081020,10A)
       (0000001686601081020,08D)
       (0000001686601081020,08D)
       (0000001686601081020,08D)
       (0000001686601081020,09D)
       (0000001686601081020,09D)
       (0000001686601081020,08D)
       (0000001686601081020,08D)
       (0000001686601081020,08D)
       (0000001686676950125,0A1)
       (0000001686676950125,0A1)
       (0000001686676950125,0A2)
  </code></pre>
  
  <p>Column $0 is account_id, column $1 is cell_id. </p>
  
  <p>For each account_id I need to find most frequant cell id.        </p>
  
  <p>First steps, that I tried to do were:</p>
  
  <pre><code> grpd = group DATA_INPUT by ($0, $1);
   cells_count  = foreach grpd GENERATE group, COUNT(DATA_INPUT.$1) AS count;
   all_cells_counts = GROUP cells_count BY group.$0;
      top_cell = FOREACH all_cells_counts {
          A = ORDER cells_count BY count DESC;
          B = LIMIT A 1;
          GENERATE FLATTEN(B.group);
      }
  </code></pre>
  
  <p>The rezult I got:</p>
  
  <pre><code>     ((0000001686601081020,08D))
       ((0000001686676950125,0A1))
  </code></pre>
  
  <p>How can I get rid of brackets (), to have in the rezult </p>
  
  <pre><code>     (0000001686601081020,08D)
       (0000001686676950125,0A1)
  </code></pre>