pandas - Merge nearly duplicate rows based on column value : <p>I have a <code>pandas</code> dataframe with several rows that are near duplicates of each other, except for one value. My goal is to merge or "coalesce" these rows into a single row, without summing the numerical values. </p>

<p>Here is an example of what I'm working with:</p>

<pre><code>Name   Sid   Use_Case  Revenue
A      xx01  Voice     $10.00
A      xx01  SMS       $10.00
B      xx02  Voice     $5.00
C      xx03  Voice     $15.00
C      xx03  SMS       $15.00
C      xx03  Video     $15.00
</code></pre>

<p>And here is what I would like:</p>

<pre><code>Name   Sid   Use_Case            Revenue
A      xx01  Voice, SMS          $10.00
B      xx02  Voice               $5.00
C      xx03  Voice, SMS, Video   $15.00
</code></pre>

<p>The reason I don't want to sum the "Revenue" column is because my table is the result of doing a pivot over several time periods where "Revenue" simply ends up getting listed multiple times instead of having a different value per "Use_Case". </p>

<p>What would be the best way to tackle this issue? I've looked into the <code>groupby()</code> function but I still don't understand it very well.</p>
