Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 18155

PYTHON - Filtering A Dataframe Under Condition

$
0
0

I have a dataset like below. Second column includes a unique number of the each organizations.There are some organizations that have the same name (like the last row)

org_nameorg_uniq_nrfounder_rankfounder_nameamount_money
Zoho65246n1m1
Zoho6522389n2m2
a19011299n3m3
b88776n4m4
c6965991n5m5
b8880n6m6
Zoho7791445n7m7

I want to filter organizations that have the lower founder_rank value. eg: There are 2 rows that have the same org_uniq_nr (Zoho). But I want only one which has lower founder_rank. So the having higher founder_rank row should be deleted.

org_nameorg_uniq_nrfounder_rankfounder_nameamount_money
Zoho10646n1m1
a19011299n3m3
b88776n4m4
c6965991n5m5
Zoho7791445n7m7

Viewing all articles
Browse latest Browse all 18155

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>