python keyerror not in index_Pandas KeyError:值不在索引中
Ihavethefollowingcode,df=pd.read_csv(CsvFileName)p=df.pivot_table(index=['Hour'],columns='DOW',values='Changes',aggfunc=np.mean).round(0)p.fillna(0,inplace=True)p[["1Sun","2Mon","3Tue","4Wed","5Thu","