Python groupby delete row with condition : <p>I'm new on python and I have an issue.</p>

<p>My original dataset is like this one: 
<a href="https://i.stack.imgur.com/1cxXN.png" rel="nofollow noreferrer">Original dataset</a></p>

<p>and I would like to get: <a href="https://i.stack.imgur.com/tqOsa.png" rel="nofollow noreferrer">final dataset</a></p>

<p>So the idea is to delete:</p>

<ul>
<li>single demand, and</li>
<li>rows where there is only one different id_user per demand. </li>
</ul>

<p>I manage to delete single demand with a Counter() but I'm stuck there:
<a href="https://i.stack.imgur.com/jOozJ.png" rel="nofollow noreferrer">probleme here</a></p>

<p>I don't want to do it manually with index because my proper dataset has more than 30000lines.</p>

<p>Can someone help me with this problem ?</p>
