Request: data[‘Churn’].value_counts(0)
Output:
0 7963
1 2037
Request: data[‘Churn’].value_counts(1)
Output:
0 79.63
1 20.37
Could you please explain how parameters of 1, 0 for value_counts work?
Advertisement
Answer
You can find an answer when reading documentation:
value_counts(0)
is the same as:
value_counts(normalize=0)
which is interpreted as:
value_counts(normalize=False)
While 1
is interpreted as True
in the opposite case.
That’s why.