Incorporating Prabhas' concise suggestions

This removes some redundancy but requires one to 'flip' the data.
Although having the transpose of the origianl dataframe is not so bad.