text_html_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

df_cust = pd.read_csv('../input/customer-segmentation-dataset/Mall_Customers.csv')

df_cust.columns

df_cust.isna().sum()

df_cust.isnull().sum()

df_cust_male = df_cust[df_cust['Genre'] == 'Male']
df_cust_female = df_cust[df_cust['Genre'] == 'Female']

plt.figure(figsize=(8, 8))
plt.scatter(df_cust_female['Age'], df_cust_female['Spending Score (1-100)'], c='blue', label='Female')
plt.scatter(df_cust_male['Age'], df_cust_male['Spending Score (1-100)'], c='orange', label='Male')
plt.legend(title='Gender')
plt.xlabel('Age')
plt.ylabel('Spending Score')
plt.title('Relationship of Age with Spending score')
plt.show()