title: Operate on pandas groupby object in a for loop
body: <p>I have a data-frame like </p>
  
  <pre><code>df = pd.DataFrame({'A': ['foo', 'bar','cat'] * 3,
               'B': ['i','who','he','am','are','said','satya','you','hello'],
               'C': [5, 2, 3, 4, 6, 9,12,23,45]})
  df
  Out[47]: 
  A      B   C
  0  foo      i   5
  1  bar    who   2
  2  cat     he   3
  3  foo     am   4
  4  bar    are   6
  5  cat   said   9
  6  foo  satya  12
  7  bar    you  23
  8  cat  hello  45
  </code></pre>
  
  <p>I am grouping them as below:</p>
  
  <pre><code>g = df.groupby('A')
  for name, group in g:
       print(name)
       print(group)
  </code></pre>
  
  <p>getting o/p as:</p>
  
  <pre><code>bar
       A    B   C
  1  bar  who   2
  4  bar  are   6
  7  bar  you  23
  cat
       A      B   C
  2  cat     he   3
  5  cat   said   9
  8  cat  hello  45
  foo
       A      B   C
  0  foo      i   5
  3  foo     am   4
  6  foo  satya  12
  </code></pre>
  
  <p>So what I need to do is I want to iterate over each group and again for each group I will iterate (i have no idea) over columns and concat the values at column <code>B</code> so that i can get something like</p>
  
  <pre><code>bar = who are you
  cat = he said hello
  foo = i am satya
  </code></pre>
  
  <p>I can't do a <code>agg</code> function on that. Can anyone suggest how to do that?</p>