# groupby对象转换为列表
d = list(g1)
print(d)
1
2
3
4
d[0][0] # 'one'
1
d[0][1]
1
# groupby对象转换为字典
dic = dict(list(g1))
print(dic)
1
2
3
4
dic.keys(http://www.amjmh.com/v/) # dict_keys(['one', 'two'])
1
dic['one']
1
---------------------
# groupby对象转换为列表
d = list(g1)
print(d)
1
2
3
4
d[0][0] # 'one'
1
d[0][1]
1
# groupby对象转换为字典
dic = dict(list(g1))
print(dic)
1
2
3
4
dic.keys(http://www.amjmh.com/v/) # dict_keys(['one', 'two'])
1
dic['one']
1
---------------------