I looked through the various answers similar to my question, but could not find a solution for my specific case.
I am creating a pandas pivot table with a multiindex as such:
df = pd.pivot_table(df, index = ['clusterKey', 'campaignTitle', 'couponName'], values = ['salesValue','budgetSpent'])
and I'd like to create a data structure where the indexes are converted into a nested dictionary, so it becomes possible to access the datastructure like this:
val = dict['clusterKeyA']['campaignTitleB']['couponNameC']['salesValue']