{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "Kg4CJ3v0I6hZ",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "collapsed": true,
        "outputId": "18b3537f-afff-436f-84c4-6abd7ee709ee"
      },
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                                                 App        Category  Rating  \\\n",
              "0     Photo Editor & Candy Camera & Grid & ScrapBook  ART_AND_DESIGN     4.1   \n",
              "1                                Coloring book moana  ART_AND_DESIGN     3.9   \n",
              "2  U Launcher Lite – FREE Live Cool Themes, Hide ...  ART_AND_DESIGN     4.7   \n",
              "3                              Sketch - Draw & Paint  ART_AND_DESIGN     4.5   \n",
              "4              Pixel Draw - Number Art Coloring Book  ART_AND_DESIGN     4.3   \n",
              "\n",
              "  Reviews  Size     Installs  Type Price Content Rating  \\\n",
              "0     159   19M      10,000+  Free     0       Everyone   \n",
              "1     967   14M     500,000+  Free     0       Everyone   \n",
              "2   87510  8.7M   5,000,000+  Free     0       Everyone   \n",
              "3  215644   25M  50,000,000+  Free     0           Teen   \n",
              "4     967  2.8M     100,000+  Free     0       Everyone   \n",
              "\n",
              "                      Genres      Last Updated         Current Ver  \\\n",
              "0               Art & Design   January 7, 2018               1.0.0   \n",
              "1  Art & Design;Pretend Play  January 15, 2018               2.0.0   \n",
              "2               Art & Design    August 1, 2018               1.2.4   \n",
              "3               Art & Design      June 8, 2018  Varies with device   \n",
              "4    Art & Design;Creativity     June 20, 2018                 1.1   \n",
              "\n",
              "    Android Ver  \n",
              "0  4.0.3 and up  \n",
              "1  4.0.3 and up  \n",
              "2  4.0.3 and up  \n",
              "3    4.2 and up  \n",
              "4    4.4 and up  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-fa87b66c-3e5f-4f37-9486-b0acd431e578\" class=\"colab-df-container\">\n",
              "    <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>App</th>\n",
              "      <th>Category</th>\n",
              "      <th>Rating</th>\n",
              "      <th>Reviews</th>\n",
              "      <th>Size</th>\n",
              "      <th>Installs</th>\n",
              "      <th>Type</th>\n",
              "      <th>Price</th>\n",
              "      <th>Content Rating</th>\n",
              "      <th>Genres</th>\n",
              "      <th>Last Updated</th>\n",
              "      <th>Current Ver</th>\n",
              "      <th>Android Ver</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>Photo Editor &amp; Candy Camera &amp; Grid &amp; ScrapBook</td>\n",
              "      <td>ART_AND_DESIGN</td>\n",
              "      <td>4.1</td>\n",
              "      <td>159</td>\n",
              "      <td>19M</td>\n",
              "      <td>10,000+</td>\n",
              "      <td>Free</td>\n",
              "      <td>0</td>\n",
              "      <td>Everyone</td>\n",
              "      <td>Art &amp; Design</td>\n",
              "      <td>January 7, 2018</td>\n",
              "      <td>1.0.0</td>\n",
              "      <td>4.0.3 and up</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>Coloring book moana</td>\n",
              "      <td>ART_AND_DESIGN</td>\n",
              "      <td>3.9</td>\n",
              "      <td>967</td>\n",
              "      <td>14M</td>\n",
              "      <td>500,000+</td>\n",
              "      <td>Free</td>\n",
              "      <td>0</td>\n",
              "      <td>Everyone</td>\n",
              "      <td>Art &amp; Design;Pretend Play</td>\n",
              "      <td>January 15, 2018</td>\n",
              "      <td>2.0.0</td>\n",
              "      <td>4.0.3 and up</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>U Launcher Lite – FREE Live Cool Themes, Hide ...</td>\n",
              "      <td>ART_AND_DESIGN</td>\n",
              "      <td>4.7</td>\n",
              "      <td>87510</td>\n",
              "      <td>8.7M</td>\n",
              "      <td>5,000,000+</td>\n",
              "      <td>Free</td>\n",
              "      <td>0</td>\n",
              "      <td>Everyone</td>\n",
              "      <td>Art &amp; Design</td>\n",
              "      <td>August 1, 2018</td>\n",
              "      <td>1.2.4</td>\n",
              "      <td>4.0.3 and up</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Sketch - Draw &amp; Paint</td>\n",
              "      <td>ART_AND_DESIGN</td>\n",
              "      <td>4.5</td>\n",
              "      <td>215644</td>\n",
              "      <td>25M</td>\n",
              "      <td>50,000,000+</td>\n",
              "      <td>Free</td>\n",
              "      <td>0</td>\n",
              "      <td>Teen</td>\n",
              "      <td>Art &amp; Design</td>\n",
              "      <td>June 8, 2018</td>\n",
              "      <td>Varies with device</td>\n",
              "      <td>4.2 and up</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Pixel Draw - Number Art Coloring Book</td>\n",
              "      <td>ART_AND_DESIGN</td>\n",
              "      <td>4.3</td>\n",
              "      <td>967</td>\n",
              "      <td>2.8M</td>\n",
              "      <td>100,000+</td>\n",
              "      <td>Free</td>\n",
              "      <td>0</td>\n",
              "      <td>Everyone</td>\n",
              "      <td>Art &amp; Design;Creativity</td>\n",
              "      <td>June 20, 2018</td>\n",
              "      <td>1.1</td>\n",
              "      <td>4.4 and up</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-fa87b66c-3e5f-4f37-9486-b0acd431e578')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-fa87b66c-3e5f-4f37-9486-b0acd431e578 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-fa87b66c-3e5f-4f37-9486-b0acd431e578');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "df",
              "summary": "{\n  \"name\": \"df\",\n  \"rows\": 10841,\n  \"fields\": [\n    {\n      \"column\": \"App\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 9660,\n        \"samples\": [\n          \"Run R Script - Online Statistical Data Analysis\",\n          \"EURES - Your Job in Europe\",\n          \"Dog Licks Screen Wallpaper\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Category\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 34,\n        \"samples\": [\n          \"LIBRARIES_AND_DEMO\",\n          \"MEDICAL\",\n          \"PRODUCTIVITY\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Rating\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0.5374313031477594,\n        \"min\": 1.0,\n        \"max\": 19.0,\n        \"num_unique_values\": 40,\n        \"samples\": [\n          5.0,\n          3.4,\n          3.3\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Reviews\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 6002,\n        \"samples\": [\n          \"66661\",\n          \"7479\",\n          \"8978\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Size\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 462,\n        \"samples\": [\n          \"746k\",\n          \"9.4M\",\n          \"35M\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Installs\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 22,\n        \"samples\": [\n          \"10,000+\",\n          \"50+\",\n          \"5,000+\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Type\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 3,\n        \"samples\": [\n          \"Free\",\n          \"Paid\",\n          \"0\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Price\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 93,\n        \"samples\": [\n          \"$17.99\",\n          \"$29.99\",\n          \"$37.99\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Content Rating\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 6,\n        \"samples\": [\n          \"Everyone\",\n          \"Teen\",\n          \"Unrated\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Genres\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 120,\n        \"samples\": [\n          \"Casual;Action & Adventure\",\n          \"Board\",\n          \"Auto & Vehicles\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Last Updated\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1378,\n        \"samples\": [\n          \"March 15, 2016\",\n          \"May 14, 2013\",\n          \"October 21, 2015\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Current Ver\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 2832,\n        \"samples\": [\n          \"7.0.4.17908\",\n          \"1.2.5.4-11\",\n          \"2.5.7.1\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Android Ver\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 33,\n        \"samples\": [\n          \"2.2 - 7.1.1\",\n          \"7.0 and up\",\n          \"3.1 and up\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 1
        }
      ],
      "source": [
        "import pandas as pd\n",
        "\n",
        "df = pd.read_csv('googleplaystore.csv')\n",
        "df.head()\n"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "df.info()\n"
      ],
      "metadata": {
        "id": "Q3q-sJUoJIws",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "b540e026-28ec-409b-f542-b55b196cf9ec"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "<class 'pandas.core.frame.DataFrame'>\n",
            "RangeIndex: 10841 entries, 0 to 10840\n",
            "Data columns (total 13 columns):\n",
            " #   Column          Non-Null Count  Dtype  \n",
            "---  ------          --------------  -----  \n",
            " 0   App             10841 non-null  object \n",
            " 1   Category        10841 non-null  object \n",
            " 2   Rating          9367 non-null   float64\n",
            " 3   Reviews         10841 non-null  object \n",
            " 4   Size            10841 non-null  object \n",
            " 5   Installs        10841 non-null  object \n",
            " 6   Type            10840 non-null  object \n",
            " 7   Price           10841 non-null  object \n",
            " 8   Content Rating  10840 non-null  object \n",
            " 9   Genres          10841 non-null  object \n",
            " 10  Last Updated    10841 non-null  object \n",
            " 11  Current Ver     10833 non-null  object \n",
            " 12  Android Ver     10838 non-null  object \n",
            "dtypes: float64(1), object(12)\n",
            "memory usage: 1.1+ MB\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "categories = {}\n",
        "\n",
        "for name in df['Category'].unique():\n",
        "    ct = 0\n",
        "    for value in df['Category']:\n",
        "        if value == name:\n",
        "            ct += 1\n",
        "    categories[name] = ct\n",
        "\n",
        "for key, value in categories.items():\n",
        "    print(f'{key}: {value}')\n"
      ],
      "metadata": {
        "id": "OYZkHSjWJI0F",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "collapsed": true,
        "outputId": "1b9e1dda-ee3d-41cf-de90-ab42ab7e588c"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "ART_AND_DESIGN: 65\n",
            "AUTO_AND_VEHICLES: 85\n",
            "BEAUTY: 53\n",
            "BOOKS_AND_REFERENCE: 231\n",
            "BUSINESS: 460\n",
            "COMICS: 60\n",
            "COMMUNICATION: 387\n",
            "DATING: 234\n",
            "EDUCATION: 156\n",
            "ENTERTAINMENT: 149\n",
            "EVENTS: 64\n",
            "FINANCE: 366\n",
            "FOOD_AND_DRINK: 127\n",
            "HEALTH_AND_FITNESS: 341\n",
            "HOUSE_AND_HOME: 88\n",
            "LIBRARIES_AND_DEMO: 85\n",
            "LIFESTYLE: 382\n",
            "GAME: 1144\n",
            "FAMILY: 1972\n",
            "MEDICAL: 463\n",
            "SOCIAL: 295\n",
            "SHOPPING: 260\n",
            "PHOTOGRAPHY: 335\n",
            "SPORTS: 384\n",
            "TRAVEL_AND_LOCAL: 258\n",
            "TOOLS: 843\n",
            "PERSONALIZATION: 392\n",
            "PRODUCTIVITY: 424\n",
            "PARENTING: 60\n",
            "WEATHER: 82\n",
            "VIDEO_PLAYERS: 175\n",
            "NEWS_AND_MAGAZINES: 283\n",
            "MAPS_AND_NAVIGATION: 137\n",
            "1.9: 1\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "df['Category'].value_counts()\n"
      ],
      "metadata": {
        "id": "r7m6ctGjJI-O",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "collapsed": true,
        "outputId": "90952d8f-cd34-4e34-b918-018f0a3f249d"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "Category\n",
              "FAMILY                 1972\n",
              "GAME                   1144\n",
              "TOOLS                   843\n",
              "MEDICAL                 463\n",
              "BUSINESS                460\n",
              "PRODUCTIVITY            424\n",
              "PERSONALIZATION         392\n",
              "COMMUNICATION           387\n",
              "SPORTS                  384\n",
              "LIFESTYLE               382\n",
              "FINANCE                 366\n",
              "HEALTH_AND_FITNESS      341\n",
              "PHOTOGRAPHY             335\n",
              "SOCIAL                  295\n",
              "NEWS_AND_MAGAZINES      283\n",
              "SHOPPING                260\n",
              "TRAVEL_AND_LOCAL        258\n",
              "DATING                  234\n",
              "BOOKS_AND_REFERENCE     231\n",
              "VIDEO_PLAYERS           175\n",
              "EDUCATION               156\n",
              "ENTERTAINMENT           149\n",
              "MAPS_AND_NAVIGATION     137\n",
              "FOOD_AND_DRINK          127\n",
              "HOUSE_AND_HOME           88\n",
              "AUTO_AND_VEHICLES        85\n",
              "LIBRARIES_AND_DEMO       85\n",
              "WEATHER                  82\n",
              "ART_AND_DESIGN           65\n",
              "EVENTS                   64\n",
              "PARENTING                60\n",
              "COMICS                   60\n",
              "BEAUTY                   53\n",
              "1.9                       1\n",
              "Name: count, dtype: int64"
            ],
            "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>count</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Category</th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>FAMILY</th>\n",
              "      <td>1972</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>GAME</th>\n",
              "      <td>1144</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>TOOLS</th>\n",
              "      <td>843</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>MEDICAL</th>\n",
              "      <td>463</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>BUSINESS</th>\n",
              "      <td>460</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>PRODUCTIVITY</th>\n",
              "      <td>424</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>PERSONALIZATION</th>\n",
              "      <td>392</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>COMMUNICATION</th>\n",
              "      <td>387</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>SPORTS</th>\n",
              "      <td>384</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>LIFESTYLE</th>\n",
              "      <td>382</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>FINANCE</th>\n",
              "      <td>366</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>HEALTH_AND_FITNESS</th>\n",
              "      <td>341</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>PHOTOGRAPHY</th>\n",
              "      <td>335</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>SOCIAL</th>\n",
              "      <td>295</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>NEWS_AND_MAGAZINES</th>\n",
              "      <td>283</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>SHOPPING</th>\n",
              "      <td>260</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>TRAVEL_AND_LOCAL</th>\n",
              "      <td>258</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>DATING</th>\n",
              "      <td>234</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>BOOKS_AND_REFERENCE</th>\n",
              "      <td>231</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>VIDEO_PLAYERS</th>\n",
              "      <td>175</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>EDUCATION</th>\n",
              "      <td>156</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>ENTERTAINMENT</th>\n",
              "      <td>149</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>MAPS_AND_NAVIGATION</th>\n",
              "      <td>137</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>FOOD_AND_DRINK</th>\n",
              "      <td>127</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>HOUSE_AND_HOME</th>\n",
              "      <td>88</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>AUTO_AND_VEHICLES</th>\n",
              "      <td>85</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>LIBRARIES_AND_DEMO</th>\n",
              "      <td>85</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>WEATHER</th>\n",
              "      <td>82</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>ART_AND_DESIGN</th>\n",
              "      <td>65</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>EVENTS</th>\n",
              "      <td>64</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>PARENTING</th>\n",
              "      <td>60</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>COMICS</th>\n",
              "      <td>60</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>BEAUTY</th>\n",
              "      <td>53</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1.9</th>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div><br><label><b>dtype:</b> int64</label>"
            ]
          },
          "metadata": {},
          "execution_count": 6
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "types = {}\n",
        "\n",
        "for name in df['Type'].unique():\n",
        "    ct = 0\n",
        "    for value in df['Type']:\n",
        "        if value == name:\n",
        "            ct += 1\n",
        "    types[name] = ct\n",
        "\n",
        "print(types)\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "DzYsStbMP1ac",
        "outputId": "92599dbf-9d69-42e9-c6b0-34db67e0bd6d"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "{'Free': 10039, 'Paid': 800, nan: 0, '0': 1}\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "(df['Type'].value_counts(normalize=True) * 100).round(2)\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 209
        },
        "id": "hBRUgeI1P1dw",
        "outputId": "a52b5079-76b5-471b-cd8c-fba5a3c45ef4"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "Type\n",
              "Free    92.61\n",
              "Paid     7.38\n",
              "0        0.01\n",
              "Name: proportion, dtype: float64"
            ],
            "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>proportion</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Type</th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>Free</th>\n",
              "      <td>92.61</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Paid</th>\n",
              "      <td>7.38</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>0.01</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div><br><label><b>dtype:</b> float64</label>"
            ]
          },
          "metadata": {},
          "execution_count": 8
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "content_rating = {}\n",
        "\n",
        "for name in df['Content Rating'].unique():\n",
        "    ct = 0\n",
        "    for value in df['Content Rating']:\n",
        "        if value == name:\n",
        "            ct += 1\n",
        "    content_rating[name] = ct\n",
        "\n",
        "print(content_rating)\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "tnmmQLYnT3NX",
        "outputId": "9eb1aaaf-e756-4121-9e8e-e2820cff6aa4"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "{'Everyone': 8714, 'Teen': 1208, 'Everyone 10+': 414, 'Mature 17+': 499, 'Adults only 18+': 3, 'Unrated': 2, nan: 0}\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "\n",
        "df['Content Rating'].value_counts()\n",
        "\n",
        "(df['Content Rating'].value_counts(normalize=True) * 100).round(2)\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 303
        },
        "id": "P51F6pjnT3Px",
        "outputId": "f0c1173e-b600-4e35-93f6-64078982273a"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "Content Rating\n",
              "Everyone           80.39\n",
              "Teen               11.14\n",
              "Mature 17+          4.60\n",
              "Everyone 10+        3.82\n",
              "Adults only 18+     0.03\n",
              "Unrated             0.02\n",
              "Name: proportion, dtype: float64"
            ],
            "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>proportion</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Content Rating</th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>Everyone</th>\n",
              "      <td>80.39</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Teen</th>\n",
              "      <td>11.14</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Mature 17+</th>\n",
              "      <td>4.60</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Everyone 10+</th>\n",
              "      <td>3.82</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Adults only 18+</th>\n",
              "      <td>0.03</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Unrated</th>\n",
              "      <td>0.02</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div><br><label><b>dtype:</b> float64</label>"
            ]
          },
          "metadata": {},
          "execution_count": 10
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "df['Reviews'].describe()\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 209
        },
        "id": "8VGP9LcfT3SY",
        "outputId": "9bf5942b-f938-4886-f6d5-70c4ef522663"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "count     10841\n",
              "unique     6002\n",
              "top           0\n",
              "freq        596\n",
              "Name: Reviews, dtype: object"
            ],
            "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>Reviews</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>count</th>\n",
              "      <td>10841</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>unique</th>\n",
              "      <td>6002</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>top</th>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>freq</th>\n",
              "      <td>596</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div><br><label><b>dtype:</b> object</label>"
            ]
          },
          "metadata": {},
          "execution_count": 11
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "categorical_cols = ['Category', 'Type', 'Content Rating']\n",
        "\n",
        "for col in categorical_cols:\n",
        "    print(f\"\\nAnalysis for {col}\")\n",
        "    print(df[col].value_counts())\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "HUzTp02YT3VA",
        "outputId": "bb2368c3-8c3e-4be1-e0b5-5839a2a084b3"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "Analysis for Category\n",
            "Category\n",
            "FAMILY                 1972\n",
            "GAME                   1144\n",
            "TOOLS                   843\n",
            "MEDICAL                 463\n",
            "BUSINESS                460\n",
            "PRODUCTIVITY            424\n",
            "PERSONALIZATION         392\n",
            "COMMUNICATION           387\n",
            "SPORTS                  384\n",
            "LIFESTYLE               382\n",
            "FINANCE                 366\n",
            "HEALTH_AND_FITNESS      341\n",
            "PHOTOGRAPHY             335\n",
            "SOCIAL                  295\n",
            "NEWS_AND_MAGAZINES      283\n",
            "SHOPPING                260\n",
            "TRAVEL_AND_LOCAL        258\n",
            "DATING                  234\n",
            "BOOKS_AND_REFERENCE     231\n",
            "VIDEO_PLAYERS           175\n",
            "EDUCATION               156\n",
            "ENTERTAINMENT           149\n",
            "MAPS_AND_NAVIGATION     137\n",
            "FOOD_AND_DRINK          127\n",
            "HOUSE_AND_HOME           88\n",
            "AUTO_AND_VEHICLES        85\n",
            "LIBRARIES_AND_DEMO       85\n",
            "WEATHER                  82\n",
            "ART_AND_DESIGN           65\n",
            "EVENTS                   64\n",
            "PARENTING                60\n",
            "COMICS                   60\n",
            "BEAUTY                   53\n",
            "1.9                       1\n",
            "Name: count, dtype: int64\n",
            "\n",
            "Analysis for Type\n",
            "Type\n",
            "Free    10039\n",
            "Paid      800\n",
            "0           1\n",
            "Name: count, dtype: int64\n",
            "\n",
            "Analysis for Content Rating\n",
            "Content Rating\n",
            "Everyone           8714\n",
            "Teen               1208\n",
            "Mature 17+          499\n",
            "Everyone 10+        414\n",
            "Adults only 18+       3\n",
            "Unrated               2\n",
            "Name: count, dtype: int64\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "xK9W40_VT3X4"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "8BRZrSsrT3ba"
      },
      "execution_count": null,
      "outputs": []
    }
  ]
}