How can I extract only the month and year from a datetime column in a Pandas DataFrame?

I have a Pandas dataframe with a column containing dates in the format ‘YYYY-MM-DD’. I want to extract just the month and year separately from the date column and create two new columns in the dataframe to store them. Can someone please help me with the code to do this?

Here’s a snippet of my current code:

I would appreciate any help on how to modify this code to extract just the month and year separately from the date column and store them in two new columns in the DataFrame. Thank you in advance!