This function is useful to massage a DataFrame into a format where one or more columns are identifier variables, while other variables are considered measures.

# Pivot simulating Tableau pivot
keys = ['NSW', 'QLD', 'VIC', 'WA']
tm = pd.melt(t, id_vars='Turnover_Date', value_vars=keys, var_name='State', value_name='Turnover $M')
tm.sort_values(['Turnover_Date', 'State']).reset_index().drop('index', axis=1).head()