Print dataframe after grouping H2o python
Question: **Data:** "<https://github.com/estimate/pandas-exercises/blob/master/baby-
names2.csv>"  
In pandas:  

    
    
    df=pd.read_csv("baby-names2.csv")
    df_group=df.groupby("year")
    print df_group.head()
    

It prints the dataframe grouped by year.  
**How do I do the same thing in H2o Python ?**  
In H2o:  

    
    
    df=h2o.upload_file("baby-names2.csv")
    df_group=df.group_by("year")
    print df_group.head() ==> gives Error
    

Expected output:  
<http://i.imgur.com/VTbMX9w.png>


Answer: To get an h2o frame after you've used `groupby()`, use `.get_frame()` which
returns the result of the group-by. For example, if you wanted to get the
count for each year you could do:

    
    
    df=h2o.import_file("baby-names2.csv")
    df_group=df.group_by("year").count()
    df_group.get_frame()
    

[which prints the year and count columns](http://i.stack.imgur.com/H3iCX.png).

