SyntaxFix
Write A Post
Hire A Developer
Questions
Using pandas module:
>>> import pandas as pd >>> import numpy as np >>> x = np.array([1,1,1,2,2,2,5,25,1,1]) >>> pd.value_counts(x) 1 5 2 3 25 1 5 1 dtype: int64