Create AQI categories (you can adjust thresholds) def categorize_aqi(aqi): if aqi <=50: return 'Good' elif aqi <=100: return 'Moderate' elif aqi <=200: return 'Poor' elif aqi <=300: return 'Unhealthy' elif aqi <=400: return 'Severe' else: return 'Hazardous' df['AQI_Category'] = df['AQI'].apply(categorize_aqi) aqi_counts = df['AQI_Category'].value_counts() 'str' object is not callable Continue reading...