Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to loop over grouped Pandas dataframe?

df = df.groupby('l_customer_id_i').agg(lambda x: ','.join(x))
for name in df.index:
    print name
    print df.loc[name]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #loop #grouped #Pandas
ADD COMMENT
Topic
Name
9+4 =