# 9.24:  MultiIndex:  use .query('Manager == "Debra H."') to select rows.

import pandas as pd
import numpy as np

df = pd.read_excel("../sales-funnel.xlsx")

table = pd.pivot_table(df, index=['Manager', 'SalesRep'],
                           aggfunc='sum',
                           values=['SaleAmount', 'Quantity'])

table.query("Manager == 'Debra H.'")

# table.query("Manager == 'Debra H.' and SalesRep == 'Craig B.'")

# table.query("SalesRep in ['Craig B.', 'Daniel H.']")

