import pandas as pd data=pd.read_csv("cities.csv") print(data) print (data.groupby([\'City\'])) from this code KeyError error is coming out how to reslove it pleas