Pandas aggregate by one column and take any random rows for the other columns

前端 未结 0 736
孤街浪徒
孤街浪徒 2020-12-16 11:54

I have a requirement where I want to group by one column of a pandas dataframe and take any random rows for the other columns. For example, the dataframe could be:

         


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