[USER (data scientist)]: Nice work! Now, how about calculating the loan approval rates for each of these segments? Please generate three Series representing the approval rates for middle-aged customers, customers with stable employment, and customers with good credit history in the 'credit_customers' dataset.
My template of code snippet is:

---BEGIN CODE TEMPLATE---

import pandas as pd 
import pickle
 
# Load the dataset 
credit_customers = pd.read_csv("credit_customers.csv") 
 
# YOUR SOLUTION BEGIN:
<code1>
[COMPLETE YOUR CODE] 
</code1>
# YOUR SOLUTION END

print(approval_rates_middle_aged)

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

print(approval_rates_stable_employment)

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

print(approval_rates_good_credit_history)

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

---END CODE TEMPLATE---

[YOU (AI assistant)]: You got it! Let's calculate the approval rates for each customer segment:
'''
import pandas as pd 
import pickle
 
# Load the dataset 
credit_customers = pd.read_csv("credit_customers.csv") 
 
# YOUR SOLUTION BEGIN:
