value_counts list pandas code example Example: count values python from collections import Counter values=np.ones(10) Counter(values)