Combined value_counts()
See original GitHub issueRather often, especially when exploring the data or creating reports, one is interested both in pd.Series.value_counts()
and `pd.Series.value_counts(normalize=True). I prepared a branch which implements a wrapper which takes care of this (link)
- Does it make sense?
- Is this implementation meeting pandas’ standards?
- Should testing of this simple wrapper be extended?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:17 (16 by maintainers)
Top Results From Across the Web
How to merge pandas value_counts() to dataframe or use it to ...
value_counts() to find the number of occurrences of particular brands. I want to merge those value counts with the respective brands in the...
Read more >how to combine the output of two pandas df.value_counts ...
I have two df.value_counts() that I'd like to combine into one: Current: y_train.value_counts() 5 545 6 510 7 159 4 42 8 15...
Read more >9 Pandas value_counts() tricks to improve your data analysis
Pandas value_counts() function returns a Series containing counts of unique values. By default, the resulting Series is in descending order ...
Read more >8 Python Pandas Value_counts() tricks that make your work ...
The value_counts() function is used to get a Series containing counts of unique values ... This can be done by combining value_counts() with ......
Read more >pandas.Series.value_counts — pandas 1.5.2 documentation
Return a Series containing counts of unique values. The resulting object will be in descending order so that the first element is the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess it is not really worthy. For future reference, I will leave the function I wrote here:
I’m not aware of any
pandas-utils
-like libraries, perhaps you could start one?And to be clear, others in the community may disagree with me, and prefer that it is included in pandas. Let’s wait and hear feedback from other maintainers and users.