I am coming from R and am trying to do the following with a dataset like this and a codebook like this:
>>> df appletype___1 appletype___2 applestype___3