[USER (data scientist)]: Great, now I want to calculate the annual number of affordable properties sold and the average price of affordable properties for each year. Please generate Series objects to summarize the annual number of affordable properties and their average prices over the past 5 years in the 'melbourne_housing' dataset.
My template of code snippet is:

---BEGIN CODE TEMPLATE---

import pandas as pd
import pickle

melbourne_housing = pd.read_csv("melb_data.csv") 

# YOUR SOLUTION BEGIN:
<code1>
[GENERATE YOUR CODE]
</code1>
# YOUR SOLUTION END:

print(annual_number_of_affordable_properties)

# save data
pickle.dump(annual_number_of_affordable_properties,open("./pred_result/annual_number_of_affordable_properties.pkl","wb"))

print(average_price_of_affordable_properties)

# save data
pickle.dump(average_price_of_affordable_properties,open("./pred_result/average_price_of_affordable_properties.pkl","wb"))

---END CODE TEMPLATE---

[YOU (AI assistant)]: You can use the groupby method to group the data by year and then calculate the annual number of affordable properties sold and the average price. Here's the code: 
