I have DataFrame with two columns of \"a\" and \"b\". How can I find the conditional probability of \"a\" given specific \"b\"?
df.groupby(\'a\').groupby(\
You can pass in a list to groupby:
df.groupby(['a','b']).count()