程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

How do I filter pandas dataframe by value count- How do I filter a pandas DataFrame based on value counts?

編輯:Python

problem :

I'm working in Python with a pandas DataFrame of video games, each with a genre. I am Python Use in Pandas DataFrame My video games , Every game has a genre .I'm trying to remove any video game with a genre that appears less than some number of times in the DataFrame, but I have no clue how to go about this. I am trying to delete any type in DataFrame A video game that appears less than a certain number of times in , But I don't know how to handle it .I did find a StackOverflow question that seems to be related, but I can't decipher the solution at all (possibly because I've never heard of R and my memory of functional programming is rusty at best). I did find it One. Seems relevant Of StackOverflow problem , But I can't decipher the solution ( Maybe it's because I've never heard of R And my memory of functional programming is at best unfamiliar ).

Help? help ?


Solution :

Reference resources : https://stackoom.com/en/question/21BvI

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved