python - Pandas: groupby index and sum, one column disappears -
input: dfs1.keys()
output: multiindex(levels=[[-1], [u'count', u'doc']], labels=[[0, 0], [0, 1]])
input: dfs1.groupby(dfs1.index).sum().keys()
output: multiindex(levels=[[-1], [u'count', u'doc']], labels=[[0], [0]])
column [-1, 'doc'] disappears
the data type in [-1, 'count'] float , in [-1, 'doc'] string
Comments
Post a Comment