nicolaskruchten / jupyter_pivottablejs

Drag’n’drop Pivot Tables and Charts for Jupyter/IPython Notebook, care of PivotTable.js
http://nicolas.kruchten.com/content/2015/09/jupyter_pivottablejs/
Other
687 stars 88 forks source link

How to specify the value and aggregator #29

Closed stumitchell closed 7 years ago

stumitchell commented 7 years ago

I can specify what the rows and columns in my dataset from pivottablejs import pivot_ui pivot_ui(prog_df, rows = ['spot_type'], cols = ['group', 'daypart', 'station'], vals = ['tarp'])

but how do I tell it I want the value of the cells to be the sum of the tarp

nicolaskruchten commented 7 years ago

add aggregatorName = 'Sum' :) ... reference here: https://github.com/nicolaskruchten/pivottable/wiki/Parameters#options-object-for-pivotui

stumitchell commented 7 years ago

Great thanks!