I have a column I have created in my Dataframe with either true or false values. now I want to analyze the data using those true or false values (as in, I only care about the true values). I'm trying to write code that can do this: if the row at that column is true, then get the data from another column of that row. More precisely I used the .groupby().count() function for data frames and would like to continue using that if possible, but would want to only count the rows with the corresponding true values. I'd appreciate any type of help! :)
Edit: The comments were helpful but they didn't answer the question I had (Sorry for lack of example earlier). Data example
For example, lets assume this is my table. I'd like to only count the person if Single == True. How would I change the .groupby().count() methods to do so?