Local Jupyter displaying results different (and worse) than online jupyter when using pivottable

Screen Link:

During the final parts of this mission, we are creating a pivot_table, aggregating data on Family and Happiness Score, using Region as index and 3 np. functions as aggregating functions. The code is as following and fine.

pv_happy_family_stats = happiness2015.pivot_table(['Happiness Score', 'Family'], 'Region', aggfunc=[np.min, np.max, np.mean], margins=True)

When running the code in the online DQ Jupyter notebook, I get the following:

When I run it in my local Jupyter Notebook, I get this instead:

It’s not an error ‘per se’, but I don’t understand why the 2 notebooks react differently. And it’s extra annoying because i highly prefer DQ’s online version of aggregating the data , it’s much more clear this way.

I’ve tried googling it, but it’s a rather specific issue I seem to be having trouble finding an answer to…

Click here to open the screen in a new tab.

Just as a minor update - I just tried doing the code in IDLE as well - it displays the pivot table the same way my local Jupyter does - the bad way.

I would suspect it was the code, but I’ve tried copy/pasting it from the DQ mission - it doesn’t help either.

Try swapping argument order, or https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.MultiIndex.swaplevel.html