This hopefully still works:
You can then do an DataFrames.unstack to pivot the table.
DataFrames.unstack