Below The image is a demo dataset
The Desired Result is like this, what pandas functions should I use here 
Please Read the headings in Image 2 to get a better understanding of my question
Below The image is a demo dataset
The Desired Result is like this, what pandas functions should I use here 
Please Read the headings in Image 2 to get a better understanding of my question
Use groupby with aggregation
df.groupby(['col1', 'col2']).agg({'col3': ['count', 'sum']})