import pandas as pd
import numpy as np
aqi = pd.read_csv("clean_data_aqi.csv")
aqi
aqi = aqi.rename(columns={"Unnamed: 0": "Index"})
aqi = aqi.set_index("Index")
aqi
aqi["month"] = aqi["Datetime"].str[0:7]
aqi.groupby(["month", "Device_Name"]).mean().reset_index()
aqi.groupby("month").mean().reset_index()
aqi[["month", "PM2.5_Hour_MassConc_Calibrated","Device_Name", "Neighborhood"]].groupby(["month", "Device_Name"]).max().reset_index()
aqi[["month", "PM2.5_Hour_MassConc_Calibrated","Device_Name","Neighborhood"]].groupby(["month", "Device_Name"]).min().reset_index()