My test dataset
Date Fruit
01/01/2021 Apple
01/01/2021 Apple
01/01/2021 Lemon
02/01/2021 Lemon
03/01/2021 Peach
03/01/2021 Apple
I require to group by date and then count by each type of fruit, so The resulting dataframe should look something like this
Date Apple Lemon Peach
01/01/2021 2 1 0
02/01/2021 0 1 0
03/01/2021 1 0 1