I have a dataframe of the form
user_id | A | B | \'a\' | 5 | 2 | \'b\' | 1 | 1 | \'a\' | 9 | 1 |
and I want to so