{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<p style=\"text-align:center\">\n",
    "    <a href=\"https://skills.network\" target=\"_blank\">\n",
    "    <img src=\"https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/assets/logos/SN_web_lightmode.png\" width=\"200\" alt=\"Skills Network Logo\"  />\n",
    "    </a>\n",
    "</p>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# **Lab: Exploring the Dataset**\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Estimated time needed: **30** minutes\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Introduction\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Data exploration is the initial phase of data analysis where we aim to understand the data's characteristics, identify patterns, and uncover potential insights. It is a crucial step that helps us make informed decisions about subsequent analysis.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Objectives\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "After completing this lab, you will be able to:\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "-   Summarize the key characteristics of a dataset.\n",
    "-   Identify different data types commonly used in data analysis.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Install the required library\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting pandas\n",
      "  Downloading pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (91 kB)\n",
      "Collecting numpy>=1.26.0 (from pandas)\n",
      "  Downloading numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (6.6 kB)\n",
      "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/conda/lib/python3.12/site-packages (from pandas) (2.9.0.post0)\n",
      "Requirement already satisfied: pytz>=2020.1 in /opt/conda/lib/python3.12/site-packages (from pandas) (2024.2)\n",
      "Collecting tzdata>=2022.7 (from pandas)\n",
      "  Downloading tzdata-2025.3-py2.py3-none-any.whl.metadata (1.4 kB)\n",
      "Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.12/site-packages (from python-dateutil>=2.8.2->pandas) (1.17.0)\n",
      "Downloading pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (12.4 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.4/12.4 MB\u001b[0m \u001b[31m166.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading numpy-2.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (16.4 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m16.4/16.4 MB\u001b[0m \u001b[31m160.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading tzdata-2025.3-py2.py3-none-any.whl (348 kB)\n",
      "Installing collected packages: tzdata, numpy, pandas\n",
      "Successfully installed numpy-2.4.1 pandas-2.3.3 tzdata-2025.3\n"
     ]
    }
   ],
   "source": [
    "!pip install pandas"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Load the dataset\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<h3>Read Data</h3>\n",
    "<p>\n",
    "We utilize the <code>pandas.read_csv()</code> function for reading CSV files. \n",
    "</p>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The functions below will download the dataset into your browser:\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Load the dataset directly from the URL\n",
    "file_path = \"https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/VYPrOu0Vs3I0hKLLjiPGrA/survey-data-with-duplicate.csv\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Utilize the Pandas method read_csv() to load the data into a dataframe.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv(file_path)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Hands on Lab\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Explore the dataset\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It is a good idea to print the top 5 rows of the dataset to get a feel of how the dataset will look.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Display the top 5 rows and columns from your dataset.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ResponseId</th>\n",
       "      <th>MainBranch</th>\n",
       "      <th>Age</th>\n",
       "      <th>Employment</th>\n",
       "      <th>RemoteWork</th>\n",
       "      <th>Check</th>\n",
       "      <th>CodingActivities</th>\n",
       "      <th>EdLevel</th>\n",
       "      <th>LearnCode</th>\n",
       "      <th>LearnCodeOnline</th>\n",
       "      <th>...</th>\n",
       "      <th>JobSatPoints_6</th>\n",
       "      <th>JobSatPoints_7</th>\n",
       "      <th>JobSatPoints_8</th>\n",
       "      <th>JobSatPoints_9</th>\n",
       "      <th>JobSatPoints_10</th>\n",
       "      <th>JobSatPoints_11</th>\n",
       "      <th>SurveyLength</th>\n",
       "      <th>SurveyEase</th>\n",
       "      <th>ConvertedCompYearly</th>\n",
       "      <th>JobSat</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>I am a developer by profession</td>\n",
       "      <td>Under 18 years old</td>\n",
       "      <td>Employed, full-time</td>\n",
       "      <td>Remote</td>\n",
       "      <td>Apples</td>\n",
       "      <td>Hobby</td>\n",
       "      <td>Primary/elementary school</td>\n",
       "      <td>Books / Physical media</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>I am a developer by profession</td>\n",
       "      <td>35-44 years old</td>\n",
       "      <td>Employed, full-time</td>\n",
       "      <td>Remote</td>\n",
       "      <td>Apples</td>\n",
       "      <td>Hobby;Contribute to open-source projects;Other...</td>\n",
       "      <td>Bachelor’s degree (B.A., B.S., B.Eng., etc.)</td>\n",
       "      <td>Books / Physical media;Colleague;On the job tr...</td>\n",
       "      <td>Technical documentation;Blogs;Books;Written Tu...</td>\n",
       "      <td>...</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>I am a developer by profession</td>\n",
       "      <td>45-54 years old</td>\n",
       "      <td>Employed, full-time</td>\n",
       "      <td>Remote</td>\n",
       "      <td>Apples</td>\n",
       "      <td>Hobby;Contribute to open-source projects;Other...</td>\n",
       "      <td>Master’s degree (M.A., M.S., M.Eng., MBA, etc.)</td>\n",
       "      <td>Books / Physical media;Colleague;On the job tr...</td>\n",
       "      <td>Technical documentation;Blogs;Books;Written Tu...</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Appropriate in length</td>\n",
       "      <td>Easy</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>I am learning to code</td>\n",
       "      <td>18-24 years old</td>\n",
       "      <td>Student, full-time</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Apples</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Some college/university study without earning ...</td>\n",
       "      <td>Other online resources (e.g., videos, blogs, f...</td>\n",
       "      <td>Stack Overflow;How-to videos;Interactive tutorial</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Too long</td>\n",
       "      <td>Easy</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>I am a developer by profession</td>\n",
       "      <td>18-24 years old</td>\n",
       "      <td>Student, full-time</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Apples</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Secondary school (e.g. American high school, G...</td>\n",
       "      <td>Other online resources (e.g., videos, blogs, f...</td>\n",
       "      <td>Technical documentation;Blogs;Written Tutorial...</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Too short</td>\n",
       "      <td>Easy</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 114 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   ResponseId                      MainBranch                 Age  \\\n",
       "0           1  I am a developer by profession  Under 18 years old   \n",
       "1           2  I am a developer by profession     35-44 years old   \n",
       "2           3  I am a developer by profession     45-54 years old   \n",
       "3           4           I am learning to code     18-24 years old   \n",
       "4           5  I am a developer by profession     18-24 years old   \n",
       "\n",
       "            Employment RemoteWork   Check  \\\n",
       "0  Employed, full-time     Remote  Apples   \n",
       "1  Employed, full-time     Remote  Apples   \n",
       "2  Employed, full-time     Remote  Apples   \n",
       "3   Student, full-time        NaN  Apples   \n",
       "4   Student, full-time        NaN  Apples   \n",
       "\n",
       "                                    CodingActivities  \\\n",
       "0                                              Hobby   \n",
       "1  Hobby;Contribute to open-source projects;Other...   \n",
       "2  Hobby;Contribute to open-source projects;Other...   \n",
       "3                                                NaN   \n",
       "4                                                NaN   \n",
       "\n",
       "                                             EdLevel  \\\n",
       "0                          Primary/elementary school   \n",
       "1       Bachelor’s degree (B.A., B.S., B.Eng., etc.)   \n",
       "2    Master’s degree (M.A., M.S., M.Eng., MBA, etc.)   \n",
       "3  Some college/university study without earning ...   \n",
       "4  Secondary school (e.g. American high school, G...   \n",
       "\n",
       "                                           LearnCode  \\\n",
       "0                             Books / Physical media   \n",
       "1  Books / Physical media;Colleague;On the job tr...   \n",
       "2  Books / Physical media;Colleague;On the job tr...   \n",
       "3  Other online resources (e.g., videos, blogs, f...   \n",
       "4  Other online resources (e.g., videos, blogs, f...   \n",
       "\n",
       "                                     LearnCodeOnline  ... JobSatPoints_6  \\\n",
       "0                                                NaN  ...            NaN   \n",
       "1  Technical documentation;Blogs;Books;Written Tu...  ...            0.0   \n",
       "2  Technical documentation;Blogs;Books;Written Tu...  ...            NaN   \n",
       "3  Stack Overflow;How-to videos;Interactive tutorial  ...            NaN   \n",
       "4  Technical documentation;Blogs;Written Tutorial...  ...            NaN   \n",
       "\n",
       "  JobSatPoints_7 JobSatPoints_8 JobSatPoints_9 JobSatPoints_10  \\\n",
       "0            NaN            NaN            NaN             NaN   \n",
       "1            0.0            0.0            0.0             0.0   \n",
       "2            NaN            NaN            NaN             NaN   \n",
       "3            NaN            NaN            NaN             NaN   \n",
       "4            NaN            NaN            NaN             NaN   \n",
       "\n",
       "  JobSatPoints_11           SurveyLength SurveyEase ConvertedCompYearly JobSat  \n",
       "0             NaN                    NaN        NaN                 NaN    NaN  \n",
       "1             0.0                    NaN        NaN                 NaN    NaN  \n",
       "2             NaN  Appropriate in length       Easy                 NaN    NaN  \n",
       "3             NaN               Too long       Easy                 NaN    NaN  \n",
       "4             NaN              Too short       Easy                 NaN    NaN  \n",
       "\n",
       "[5 rows x 114 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "## Write your code here\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Find out the number of rows and columns\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Start by exploring the numbers of rows and columns of data in the dataset.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Print the number of rows in the dataset.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "65457\n"
     ]
    }
   ],
   "source": [
    "## Write your code here\n",
    "print(df.shape[0])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Print the number of columns in the dataset.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "114\n"
     ]
    }
   ],
   "source": [
    "## Write your code here\n",
    "print(df.shape[-1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Identify the data types of each column\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Explore the dataset and identify the data types of each column.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Print the datatype of all columns.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ResponseId int64\n",
      "MainBranch object\n",
      "Age object\n",
      "Employment object\n",
      "RemoteWork object\n",
      "Check object\n",
      "CodingActivities object\n",
      "EdLevel object\n",
      "LearnCode object\n",
      "LearnCodeOnline object\n",
      "TechDoc object\n",
      "YearsCode object\n",
      "YearsCodePro object\n",
      "DevType object\n",
      "OrgSize object\n",
      "PurchaseInfluence object\n",
      "BuyNewTool object\n",
      "BuildvsBuy object\n",
      "TechEndorse object\n",
      "Country object\n",
      "Currency object\n",
      "CompTotal float64\n",
      "LanguageHaveWorkedWith object\n",
      "LanguageWantToWorkWith object\n",
      "LanguageAdmired object\n",
      "DatabaseHaveWorkedWith object\n",
      "DatabaseWantToWorkWith object\n",
      "DatabaseAdmired object\n",
      "PlatformHaveWorkedWith object\n",
      "PlatformWantToWorkWith object\n",
      "PlatformAdmired object\n",
      "WebframeHaveWorkedWith object\n",
      "WebframeWantToWorkWith object\n",
      "WebframeAdmired object\n",
      "EmbeddedHaveWorkedWith object\n",
      "EmbeddedWantToWorkWith object\n",
      "EmbeddedAdmired object\n",
      "MiscTechHaveWorkedWith object\n",
      "MiscTechWantToWorkWith object\n",
      "MiscTechAdmired object\n",
      "ToolsTechHaveWorkedWith object\n",
      "ToolsTechWantToWorkWith object\n",
      "ToolsTechAdmired object\n",
      "NEWCollabToolsHaveWorkedWith object\n",
      "NEWCollabToolsWantToWorkWith object\n",
      "NEWCollabToolsAdmired object\n",
      "OpSysPersonal use object\n",
      "OpSysProfessional use object\n",
      "OfficeStackAsyncHaveWorkedWith object\n",
      "OfficeStackAsyncWantToWorkWith object\n",
      "OfficeStackAsyncAdmired object\n",
      "OfficeStackSyncHaveWorkedWith object\n",
      "OfficeStackSyncWantToWorkWith object\n",
      "OfficeStackSyncAdmired object\n",
      "AISearchDevHaveWorkedWith object\n",
      "AISearchDevWantToWorkWith object\n",
      "AISearchDevAdmired object\n",
      "NEWSOSites object\n",
      "SOVisitFreq object\n",
      "SOAccount object\n",
      "SOPartFreq object\n",
      "SOHow object\n",
      "SOComm object\n",
      "AISelect object\n",
      "AISent object\n",
      "AIBen object\n",
      "AIAcc object\n",
      "AIComplex object\n",
      "AIToolCurrently Using object\n",
      "AIToolInterested in Using object\n",
      "AIToolNot interested in Using object\n",
      "AINextMuch more integrated object\n",
      "AINextNo change object\n",
      "AINextMore integrated object\n",
      "AINextLess integrated object\n",
      "AINextMuch less integrated object\n",
      "AIThreat object\n",
      "AIEthics object\n",
      "AIChallenges object\n",
      "TBranch object\n",
      "ICorPM object\n",
      "WorkExp float64\n",
      "Knowledge_1 object\n",
      "Knowledge_2 object\n",
      "Knowledge_3 object\n",
      "Knowledge_4 object\n",
      "Knowledge_5 object\n",
      "Knowledge_6 object\n",
      "Knowledge_7 object\n",
      "Knowledge_8 object\n",
      "Knowledge_9 object\n",
      "Frequency_1 object\n",
      "Frequency_2 object\n",
      "Frequency_3 object\n",
      "TimeSearching object\n",
      "TimeAnswering object\n",
      "Frustration object\n",
      "ProfessionalTech object\n",
      "ProfessionalCloud object\n",
      "ProfessionalQuestion object\n",
      "Industry object\n",
      "JobSatPoints_1 float64\n",
      "JobSatPoints_4 float64\n",
      "JobSatPoints_5 float64\n",
      "JobSatPoints_6 float64\n",
      "JobSatPoints_7 float64\n",
      "JobSatPoints_8 float64\n",
      "JobSatPoints_9 float64\n",
      "JobSatPoints_10 float64\n",
      "JobSatPoints_11 float64\n",
      "SurveyLength object\n",
      "SurveyEase object\n",
      "ConvertedCompYearly float64\n",
      "JobSat float64\n"
     ]
    }
   ],
   "source": [
    "## Write your code here\n",
    "for col in df:\n",
    "    print(col, df[col].dtype)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Print the mean age of the survey participants."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "count               65457\n",
      "unique                  8\n",
      "top       25-34 years old\n",
      "freq                23913\n",
      "Name: Age, dtype: object\n",
      "Mean age: 33.03\n"
     ]
    }
   ],
   "source": [
    "## Write your code here\n",
    "print(df['Age'].describe())\n",
    "mean_age = []\n",
    "for a in df['Age']:\n",
    "    age = ''.join(c for c in str(a) if c.isdigit())\n",
    "    if age == '':\n",
    "        continue\n",
    "    elif len(age) == 4:\n",
    "        age = (int(age[:2]) + int(age[2:])) / 2\n",
    "    else:\n",
    "        age = int(age)\n",
    "    mean_age.append(age)\n",
    "print('Mean age:', round(sum(mean_age) / len(mean_age), 2))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The dataset is the result of a world wide survey. Print how many unique countries are there in the Country column.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "186\n"
     ]
    }
   ],
   "source": [
    "## Write your code here\n",
    "print(len(df['Country'].unique()))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Copyright ©  IBM Corporation. All rights reserved.\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  },
  "prev_pub_hash": "e3b5377a628de02106f68245815ded3ee298984900f5092e6effc169312da2a4"
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
