I have a dataframe, that looks like below.
table                            some_date     count      
A_table                          1/1/2020   451663386
                                 1/10/2020  731919336
                                 1/11/2020   95637849
                                 1/12/2020  889510610
                                 1/13/2020  834557529
                                 1/14/2020  881597773
                                 1/15/2020  838596734
                                 1/16/2020  920376244
                                 1/17/2020  832792096
                                 1/18/2020  779652777
                                 1/19/2020  834532103
                                 1/2/2020   521978525
                                 1/20/2020  777782936
                                              ...
B_table                          2/24/2020    5492546
                                 2/25/2020    5594754
                                 2/26/2020    5201614
                                 2/27/2020    5961111
                                 2/28/2020    6811793
                                 2/29/2020    6275315
                                 2/3/2020    13307059
                                 2/4/2020    11695493
                                 2/5/2020     9034222
I want to go from above to this.
some_date   A_table B_table
1/10/2020   731919336   NA
1/11/2020   95637849    NA
1/12/2020   889510610   NA
1/13/2020   834557529   NA
1/14/2020   881597773   5594754
1/15/2020   838596734   5201614
1/16/2020   920376244   5961111
1/17/2020   832792096   6811793
1/18/2020   779652777   6275315
1/19/2020   834532103   13307059
1/2/2020    521978525   11695493
1/20/2020   777782936   9034222
I tried to do a pivot
df.set_index('some_date').unstack('table')
It doesn't seem to be the right approach. Any help is appreciated.
Thanks
 
     
     
    