Pivot tables are often used on the shop floor when analyzing large amounts of data in Excel. This is convenient when you want to aggregate data exploratively. Isn't it possible to have a pivot table with Jupyter Notebook? When I was looking into it, I found that I could do it by using a library called pivottablejs.
import pivottablejs
import seaborn as sns
sns.set_style('whitegrid')
#Data set loading
df=sns.load_dataset('tips')
pivottablejs.pivot_ui(df)
You can do aggregation by dragging and dropping. It's very convenient because you can do it in the same way as Excel.
Recommended Posts