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)
This can work:

import pandas as pd
import numpy as np

unstacked_df = stacked_df.unstack()


The next time you post, you could post a reproducible code so we could help you a little more.