import pandas as pd # Create DataFrame with date column df = pd.DataFrame({'date': ['2022-01-01', '2022-02-01', '2022-03-01']}) # Code to extract month and year goes here # Print updated DataFrame print(df)