All pandas problems
MediumPivot + Reshape
Pivot — city × product revenue
Reshape into a matrix where rows are cities, columns are products, and cells are total revenue. Fill missing combinations with 0.
- #pivot_table
Sample input
same sales CSV
Sample output
4-row × 2-col matrix (cities × [kurta, saree])
pd-pivot.pyneeds: pandas
Output
Press "Run code" to execute.
