Add `unique_counts()`?
See original GitHub issueThis is a follow-up of #275. I’ve found numpy.unique(x, return_counts=True)
quite useful. It allows us to build a histogram for the input array x
. I’d suggest us to add the following function:
def unique_counts(x, /):
"""
return a tuple of two arrays (unique values and counts)
"""
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Count unique values among duplicates - Microsoft Support
Add the total by using the SUM function. Count the number of unique values by using the FREQUENCY function. The FREQUENCY function ignores...
Read more >Excel Pivot Tables Count Unique Items - Contextures
How to count unique items (count distinct) in Excel pivot table. Three methods, for different versions of Excel. Get free workbook to follow ......
Read more >How to Count Unique and Distinct Values in Excel | Excelchat
Count Distinct Values in Excel · Select cells A1:B11. Go to Insert > Pivot Table. · In the dialog box that pops up,...
Read more >Count unique and distinct values in Excel with formula or pivot ...
See how to count unique values in Excel with a formula and get an automatic count of all different values in a pivot...
Read more >SQL COUNT() with DISTINCT - w3resource
SQL COUNT() function with DISTINCT clause eliminates the repetitive appearance of the same data. The DISTINCT can come only once in a given ......
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
Seems very reasonable, and if we add it we should indeed add it to the
v2021
milestone. Better to do all four newunique_*
functions in one go.Thanks @leofang!