I am trying to make a schedule in excel using pandas. I currently have the times of the day as the index in 15 min time frames and have the class that occupies those classes printed in each cell. I want to be able to merge all the rows that have duplicated classes into one large cell but am lost as to how to do that.

How schedule looks as pandas dataframe:
[pandas dataframe](https://i.stack.imgur.com/u30LF.png)

How schedule prints in excel:
[current excel schedule](https://i.stack.imgur.com/izb5f.png)

How I want the schedule to look like in excel:
[dream excel schedule](https://i.stack.imgur.com/rW9KK.png)

Is there a way to make this happen?