How to translate this dataframe using Pandas [duplicate]

I have a panda DataFrame that looks like this:

    Name            Time          Court
0   Smith       08:00 AM        1  
1   Smith       08:30 AM        1
2   Smith       09:00 AM        1
3   Smith       09:30 AM    1
4   Smith       10:00 AM    1
5   Smith       10:30 AM    1
6   Smith       08:00 AM    2
7   Smith       10:30 AM    2
8   Kissinger   12:00 PM    3
9   Kissinger   09:30 AM    4
10  Kissinger   10:00 AM    5
11  Kissinger   09:30 AM    6

etc

I want it to look like this, where the Court# is the header and times are the index:

    1            2               3               4                 5                 6
08:00 AM     Smith        Smith
08:30 AM     Smith
09:00 AM     Smith
09:30 AM     Smith                                       Kissinger                           Kissinger
10:00 AM     Smith                                                          Kissinger
10:30 AM     Smith        Smith
11:00 AM
11:30 AM
12:00 PM                                 Kissinger
12:30 PM
etc

I've tried many things but this is beyond my knowledge level. Thanks for your help in solving this problem!

Back to Top