I have a feature that only consist of binary Values (0,1). I'm trying to count the number of occurrences of each binary value in a single column or feature.
Code:
df = pd.read_csv(training_file)
data = df.iloc[:, 2]
#This only returns the size of the column and not sure why
print(data.count())
Is there a way with panda to only return the number of occurrence for a specific value like 0?