I want to know that how can I count elements in a column of dataframe and know what element has the highest count?
For example, I have this dataframe:
sample target 0 a 0 1 b 0 2 c 0 3 d 1 4 e 1 5 f 1 6 g 0 At the first step, I have to count target column: I want something that give me how many 0 or 1 is in target column and at the next step I want to know what target has the greater amount of count. In this example the answer is 0, my question is how can I get the true target. In this case, I need a code to give me 0 as the greatest amount of count for target column.