title: How to turn a dataframe of two columns, where each row represents a pair of friends id, into a data with id and all their friends in the one row?
body: <p>Data example:</p>
  
  <p>col1  col2 </p>
  
  <pre><code>id1   id2
  id2   id3
  id1   id4
  id3   id4
  </code></pre>
  
  <p>Output: </p>
  
  <p>col1 col2</p>
  
  <pre><code>id1  id2, id4
  id2  id1, id3
  id3  id2
  id4  id1, id3
  </code></pre>