Groupby and drop NaN rows while preserving one in Pandas

后端 未结 0 334
孤独总比滥情好
孤独总比滥情好 2020-12-18 14:01

Given a test dataset as follows:

   id city  name 
0   1   bj    NaN
1   2   bj   jack
2   3   bj    NaN
3   4   bj    jim
4   5   sh    NaN
5   6   sh    NaN         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题