I want to rename the subplot column but I can't do it. I use the code below:
#Encoder variable before plot bar graphs
enc = LabelEncoder()
cols = ['gender', 'children', 'smoker', 'region', 'charges']
X1 = Insurance2[cols].apply(enc.fit_transform)
print(X1)
#bar graphs
attributes = ['gender', 'children', 'smoker', 'region']
plt.subplots(figsize=(15, 10))
for i, col in enumerate(attributes):
plt.subplot(2, 2, i + 1)
X1.groupby(col).mean()['charges'].plot.bar()
plt.show()
The result is shown here: I want to change gender from (0,1) to (male, female), smoker from (0,1) to (yes, no) and also region.
Please advise me. Thank you in advance.

Example Code
we need minimal and reproducible example to answer your question. lets make example
X1
Only two columns, gender and smoker, were created because I thought that would be enough.
Code
plot: