One of the most frequent operations when doing data analysis is looking at the frequency counts information.
I wanted to list down the various ways of doing this task:
- using python collections: Counter and Defaultdict
- using numpy
- with numpy.unique, with return_counts argument
- with bincount, nonzero, zip / vstack
- using pandas
- using scipy