# Groupby date and find number of occurrences of a value a in another column using pandas

My Dataset is looking like this

I would like to get the output something like this.

I need to group by date and find the occurrences if each feedback. In this case, i have 5 feedback types (namely 5,4,3,2,1)

• df.groupby(['Date', 'Feedback']).size().unstack() Apr 11 '19 at 17:44

import pandas as pd