Check out example codes for "pandas value_counts multiple columns". It will help you in understanding the concepts better.

Code Example 1

In [212]:
df = pd.DataFrame(np.random.randint(0, 2, (10, 4)), columns=list('abcd'))
df.apply(pd.Series.value_counts)
Out[212]:
   a  b  c  d
0  4  6  4  3
1  6  4  6  7

Learn ReactJs, React Native from akashmittal.com