Pandas: select only the first row of a column
<p>I have a problem with the pandas dataframe. I have this df:</p>

<pre><code>       ID                     type
28030  LVE-188599             PPC
28031  LVE-188599             PPC
28032  LVE-188599             PPC
28033  LVE-188599       Affiliate
28034  LVE-188599             PPC
28035  LVE-188599             PPC
28036  LVE-188599             PPC
</code></pre>

<p>and I want to select only the unique values of the column "type" inside the same group of ID ( I want to obtain a dataframe with two columns as result):</p>

<pre><code>       ID                     type
28030  LVE-188599             PPC
28033  LVE-188599       Affiliate
28034  LVE-188599             PPC
</code></pre>

<p>Do you know how can I do this? 
I used to work with SAS and this can be easily solved doing a </p>

<pre><code>data out;
set in;
by ID;
if first.type;
run;
</code></pre>

<p>Thanks!</p>