Melt wide to long (city, month, sales), drop the rows with missing sales, then pivot it back so each month is a row and each city is a column, filling gaps with 0. Keep months in the order Jan, Feb, Mar.
Store the table in result.
import pandas as pd
wide = pd.DataFrame({
"city": ["Pune", "Delhi", "Mumbai"],
"Jan": [120, 210, 340],
"Feb": [135, None, 360],
"Mar": [150, 190, 355],
})Store your final answer in a variable named result.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.