<jupyter_start><jupyter_text>pandas GroupBypandas groupby fun is used to split the data into groups based on some criteria<jupyter_code>import pandas as pd
data =pd.read_csv('C:\\Users\\admin\\Desktop\\book1.csv')
data
gp = data.groupby( by = "Age")
gp

gp.groups
gp = data.groupby( by = ["Age",'marks'])
gp
gp.groups
for Age,marks in gp:
    print(Age)
    print(marks)
gp= data.groupby('Age').get_group(34)
gp
gp.mean()<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup