I have some problem to generate pivot tables. I try to do this with Python. Now I have test tables:
Table 1

I want to do tables that looks like this:
Table 2

I write code but still have two columns but no sum of this.
import pandas as pd
import numpy as np
table = pd.read_excel('test.xlsx',0)
print(table.head())
print(pd.pivot_table(table,values=["A","B","C","D","E","F","G"],columns=[np.sum]))