I know the title sounds confusing. But let me explain with an example. I have date vise data of covid cases in states of India.
The data is of the below form
I want it to be like
Each date can have new state names based of if those states got new cases. So for each date the data can have varied number of states name as per first image.