Examples
import numpy as np
import pandas as pd
df = pd.DataFrame({'fff': ['one', 'one', 'one', 'two', 'two',
'two'],
'bbb': ['P', 'Q', 'R', 'P', 'Q', 'R'],
'baa': [2, 3, 4, 5, 6, 7],
'zzz': ['h', 'i', 'j', 'k', 'l', 'm']})
df
df.pivot(index='fff', columns='bbb', values='baa')
df.pivot(index='fff', columns='bbb')['baa']
df.pivot(index='fff', columns='bbb', values=['baa', 'zzz'])