below shown the sales data
i have created function so that i get the summary of sales city wise,
import pandas as pd
Super=pd.read_excel(r"C:\Script Testing\supermarket_sales.xlsx")
Location=Super[Super["City"]=="Yangon"]
def Summary():
PDT=Location.groupby(["Product line","Invoice ID"])["Total"].sum()
PDTT=PDT.reset_index()
return PDT
can anyone suggest how to run this function across all the cities in the data without creating a separate function for each city
