提交 5b0feefc 编写于 作者: T TRHX

Back up my www.itrhx.com blog

上级 4e6b8dad
...@@ -534,7 +534,7 @@ GroupBy 对象支持转换成列表或字典: ...@@ -534,7 +534,7 @@ GroupBy 对象支持转换成列表或字典:
7 a three 0.112884 0.004367 7 a three 0.112884 0.004367
>>> >>>
>>> grouped = obj.groupby('key1') >>> grouped = obj.groupby('key1')
>>> list(grouped1) >>> list(grouped)
[('a', key1 key2 data1 data2 [('a', key1 key2 data1 data2
0 a one -0.607009 1.948301 0 a one -0.607009 1.948301
2 a two -2.086024 0.358164 2 a two -2.086024 0.358164
...@@ -546,7 +546,7 @@ GroupBy 对象支持转换成列表或字典: ...@@ -546,7 +546,7 @@ GroupBy 对象支持转换成列表或字典:
3 b three 0.446061 1.708797 3 b three 0.446061 1.708797
5 b two 0.981877 2.159327)] 5 b two 0.981877 2.159327)]
>>> >>>
>>> dict(list(grouped1)) >>> dict(list(grouped))
{'a': key1 key2 data1 data2 {'a': key1 key2 data1 data2
0 a one -0.607009 1.948301 0 a one -0.607009 1.948301
2 a two -2.086024 0.358164 2 a two -2.086024 0.358164
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册