Created
September 24, 2014 01:10
-
-
Save tdsmith/cb762f3158eb60927759 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: import pandas as pd | |
In [2]: df = pd.DataFrame({'foo': ['a', 'a', 'b', 'b'], 'bar': [1,2,3,4]}) | |
In [3]: g = df.groupby('foo') | |
In [5]: for group in g: | |
...: print(group) | |
...: | |
('a', bar foo | |
0 1 a | |
1 2 a) | |
('b', bar foo | |
2 3 b | |
3 4 b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment