I have a dataframe of the form:
I want the entries in the 'y' column to appear as columns without any hard coding. the output should be: