1

I have a dataframe named data which i need to filter based on other dataframe/Series value_counts which has been produced from data dataframe Tags column containing like list of string ['python', 'windows', 'pip', 'pygame', 'pycharm'] using pd.DataFrame(data.Tags.values.tolist()).stack().value_counts() and this returns like this,

python                  20906
javascript              16692
java                    11324
c#                       8358
android                  7865
                        ...  
mysql-5.5                   1
asp-net-core                1
rxdatasources               1
background-sync             1
forwarding-reference        1
Length: 23633, dtype: int64

And I need to filter the data dataframe to remove Tags with count >2.

martian_rover
  • 339
  • 6
  • 15
  • https://stackoverflow.com/questions/29836836/how-do-i-filter-a-pandas-dataframe-based-on-value-counts – ombk Nov 26 '20 at 16:49
  • 1
    Does this answer your question? [How do I filter a pandas DataFrame based on value counts?](https://stackoverflow.com/questions/29836836/how-do-i-filter-a-pandas-dataframe-based-on-value-counts) – ombk Nov 26 '20 at 16:50
  • it is not related to my question. Pls read the question carefully. The question you are referring me is about the same dataframe and I am asking about `value_count` based on other dataframe. And pls open the question. – martian_rover Nov 26 '20 at 16:58
  • then please read how to ask a question and show a MRE, and all ur data – ombk Nov 26 '20 at 16:59
  • Can you pls open the question so that other may be able to answer? – martian_rover Nov 26 '20 at 17:00

0 Answers0