Sort Pandas DataFrame by value

前端 未结 2 1077
攒了一身酷
攒了一身酷 2020-12-11 14:34

I Know this question has a lot of answers, for example: How to sort pandas data frame using values from several columns?

I tried the solutions given by the users, bu

2条回答
  •  再見小時候
    2020-12-11 14:47

    If I'm understanding you correctly, you're trying to sort that df by 'retweets'? use:

    maxTweets_sorted = maxTweets.sort_values(by='Retweets')
    

提交回复
热议问题