python 2.7 - Hierarchical index in data frame missing columns -
im trying learn pandas doing different exercises. created dataframe looks example below. i'm trying create unique id concatenating fields, when data frame columns have fpd column. explain me why don't see columns?
monthid pollutantid processid roadtypeid avgspeedbinid fpd 1 1 1 4 1 1.749101 2 0.935300 3 0.529701 4 0.393052 5 0.306381 6 0.261649 7 0.235040
i data frame executing this:
fpd = data['fpd'].groupby([data['monthid'],data['pollutantid'], data['processid'],data['roadtypeid'],data['avgspeedbinid']]).sum() fp = pd.dataframe(fpd)
you reset multiindex columns by:
fp.reset_index(inplace=true)
Comments
Post a Comment