I have a Dataframe df ,you can have it by running the following code:
import pandas as pd
from io import StringIO
df = """
month status_review supply_review
2023-01-01 False False
2023-01-01 True True
2022-12-01 False True
2022-12-01 True True
2022-12-01 False False
"""
df= pd.read_csv(StringIO(df.strip()), sep='\s\s+', engine='python')
How can I count how many status_reviews and supply_review are True in each month?
The output should look like the following:
month # of true status_review # of true supply_review
2023-01-01 1 1
2022-12-01 1 2