SyntaxFix
Write A Post
Hire A Developer
Questions
take advantage of the methods offered by a Series:
>>> import pandas as pd >>> y = [0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1] >>> pd.Series(y).value_counts() 0 8 1 4 dtype: int64