{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "MTIXrkCYKtlu" }, "source": [ "Importing the Dependencies" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "id": "mL7HLYQFXW-c" }, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "from sklearn.cluster import KMeans" ] }, { "cell_type": "markdown", "metadata": { "id": "KigjC6mBLJN3" }, "source": [ "Data Collection & Analysis" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "id": "gTSFo2LiLIav" }, "outputs": [], "source": [ "customer_data = pd.read_csv('F:\\\\Customer-Segmentation\\\\data\\\\Mall_Customers.csv')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 196 }, "id": "mbtjztN3Lhcu", "outputId": "4b5e3ec9-1784-4918-bece-7616a2305e4b" }, "outputs": [ { "data": { "text/html": [ "
| \n", " | CustomerID | \n", "Gender | \n", "Age | \n", "Annual Income (k$) | \n", "Spending Score (1-100) | \n", "
|---|---|---|---|---|---|
| 0 | \n", "1 | \n", "Male | \n", "19 | \n", "15 | \n", "39 | \n", "
| 1 | \n", "2 | \n", "Male | \n", "21 | \n", "15 | \n", "81 | \n", "
| 2 | \n", "3 | \n", "Female | \n", "20 | \n", "16 | \n", "6 | \n", "
| 3 | \n", "4 | \n", "Female | \n", "23 | \n", "16 | \n", "77 | \n", "
| 4 | \n", "5 | \n", "Female | \n", "31 | \n", "17 | \n", "40 | \n", "