Apr-10-2018, 09:07 PM
I have a dataframe with a lot of columns with binary values.
Is it possible to count the number of rows that satisfy a condition
ex: the number of rows for Col1 and Col2 that are both 1 is 2
similarly the number of rows for Col1 and Col2 that are 0 and 1 is 1
Is there an easy way to do this rather than looping all over the dataframe?
Is it possible to count the number of rows that satisfy a condition
ex: the number of rows for Col1 and Col2 that are both 1 is 2
similarly the number of rows for Col1 and Col2 that are 0 and 1 is 1
Is there an easy way to do this rather than looping all over the dataframe?