GroupBy Dataframe by one column and get count based on another column

I understand the title might not make much sense. I want a separate count of Action values Yes and No Per Month, given the data below.

Here is my data

    Date      Action
234 2021-03-05   yes
235 2021-03-05   yes
236 2021-03-15   yes
237 2021-03-02    no
238 2021-03-05   yes
..         ...    ...
460 2020-01-10    no
461 2019-12-27    no
462 2019-12-19    no
463 2019-12-18    no
464 2019-12-17    no

Current Code

var = df.groupby(df.dt.strftime("%y-%m")).size().reset_index(name='counts')
var = var .to_dict(orient='records')

Current Output

[{date: "2021-03", count: "10"},{},...]

Desired Output

[{date: "2021-03", "yes": 2, "no": 8},{},...]

Answer

Let us do crosstab

output = pd.crosstab(df["Date"].dt.strftime("%y-%m"),df.Action).reset_index().to_dict("records")