Pandas Percentage count on a DataFrame groupby
Could be just this:
In [73]:
print pd.DataFrame({'Percentage': df.groupby(('ID', 'Feature')).size() / len(df)})
Percentage
ID Feature
0 False 0.2
True 0.3
1 False 0.3
True 0.2