Groupby date and find number of occurrences of a value a in another column using pandas
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.