I am trying to set up a script to help to order garment blanks. I have a dataset that looks like this:
| design | s | m | l | xl | style | color |
|----------|---|---|---|----|---------|-------|
| design 1 | 5 | 3 | 6 | 1 | style 1 | black |
| design 2 | 4 | 6 | 9 | 5 | style 2 | red |
| design 3 | 2 | 6 | 5 | 8 | style 1 | red |
| design 4 | 6 | 8 | 4 | 1 | style 1 | black |
| design 5 | 8 | 2 | 1 | 1 | style 1 | blue |
| design 6 | 6 | 9 | 5 | 4 | style 2 | red |
And I would like to be able to use Pandas to basically sum the totals of each style / color pair so I can order the total amount.
Given the data above, I would like the output to be something like:
| style | color | s | m | l | xl |
|---------|-------|----|----|----|----|
| style 1 | black | 11 | 11 | 10 | 2 |
| style 1 | red | 2 | 6 | 5 | 8 |
| style 1 | blue | 8 | 2 | 1 | 1 |
| style 2 | red | 10 | 15 | 14 | 9 |