I have a dataframe with a huge mix of data. I want to get a count of how many times a single value occurs.
I have seen this as a way to get a count of all values: df.apply(pd.value_counts)
What I want is to get a count of just how many times that "No" appears. Not how many times each value appears, just how many times that "No" appears. So given a snapshot like below, I could get something like "The count for 'No' is 5".
Thank you!
EDIT: For those that flagged this as a duplicate, please read the post again. I am not trying to get a count of all the times a value appears in one column, I am looking for a count of all the times the value appears in the whole dataset, i.e. all columns. From the issue you linked, (df.education == '9th').sum() is looking at a single column, and that OP specifically asked, " I want to find the number of times something appears in a column".