title: How to groupby on two columns and get the values of that corresponding combination from the third column in python?
body: <p>I have a dataframe given as</p>
  
  <pre><code>        df=        col1         col2      Labels
                      x            a          abc
                      x            a          def
                      x            b          efg
                      y            b          cfg
                      g            p          def
  </code></pre>
  
  <p>I want to take distinct combinations from col1 and col2 and get all labels for that combination from Labels column.</p>
  
  <p>Expected output:</p>
  
  <pre><code>   df2 =         col1     col2     Labels
                    x        a       abd,def
                    x        b         efg
                    y        b         cfg
                    g        p         def
  </code></pre>
  
  <p>Kindly help.    </p>