How to change df.pivot_table result into dataframe?

in process of using pivot table, I found there not able to export the pivot result to a dataframe
on the other hand, how to get the 1st column and 2rd column result from pivot result table?

thank you.

I solved this by myself.
to get a new dataframe from pivot_table, we can do like this:

df=df.pivot_table(index=["a"], values=["b"])
#to obtain the 1st column content
#to obtain the 2rd column content
1 Like