df 为dataframe对象,包含'word', 'count'两列数据
result_dic = df.groupby('word')['count'].apply(lambda x:str(x)).to_dict()
result_dic = df.groupby('word')['count'].apply(lambda x:x).to_dict()
这两个结果竟然完全不一样,第一个可以达到期望的效果,生成{key:value}的字典

# 而第二种生成的字典是{index:value}.

这是为什么呢,求解。