Skip to content

Instantly share code, notes, and snippets.

@AlexDev404
Created May 8, 2023 01:12
Show Gist options
  • Save AlexDev404/b055c9d523b80079e81df062aa093a59 to your computer and use it in GitHub Desktop.
Save AlexDev404/b055c9d523b80079e81df062aa093a59 to your computer and use it in GitHub Desktop.
Copy of BINT_TEST_2
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/AlexDev404/b055c9d523b80079e81df062aa093a59/copy-of-bint_test_2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "6799899f",
"metadata": {
"id": "6799899f"
},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "94950254",
"metadata": {
"id": "94950254"
},
"outputs": [],
"source": [
"bint_df = pd.read_csv(\"BINT.csv\")"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "af089123",
"metadata": {
"id": "af089123",
"outputId": "3d6e28e2-0001-4a42-ca9e-4001e83e0461",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 644
}
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" STUID DOB GENDER ETHNICITYID ETHNICITY CITYID CITY \\\n",
"54 19 12/27/1980 F 13.0 Mestizo 52,456 ORANGE WALK \n",
"103 56 10/30/1981 M 13.0 Mestizo 52,997 BELMOPAN CITY \n",
"107 105 5/31/1976 M 16.0 Unknown 53,550 CAYO \n",
"118 109 8/4/1981 M 16.0 Unknown 53,550 CAYO \n",
"136 120 1/3/1983 F 8.0 Creole 53,222 BELIZE CITY \n",
"... ... ... ... ... ... ... ... \n",
"8366 8340 7/9/1979 M 13.0 Mestizo 53,222 BELIZE CITY \n",
"8392 8368 2/24/1981 F 16.0 Unknown 53,222 BELIZE CITY \n",
"8421 8394 1/27/1979 M 7.0 Caucasian 52,997 BELMOPAN CITY \n",
"8442 8423 6/13/1978 F 8.0 Creole 53,222 BELIZE CITY \n",
"8443 1 NaN NaN NaN NaN NaN NaN \n",
"\n",
" DISTRICTID DISTRICT FEEDERID ... SEMESTERPOINTS SEMESTERGPA \\\n",
"54 25.0 ORANGE WALK 164.0 ... 9.00 3.65 \n",
"103 393.0 CAYO 164.0 ... 0.00 0.00 \n",
"107 75.0 BELIZE 165.0 ... 12.00 3.75 \n",
"118 75.0 BELIZE 162.0 ... 7.50 2.00 \n",
"136 75.0 BELIZE 164.0 ... 7.50 3.70 \n",
"... ... ... ... ... ... ... \n",
"8366 75.0 BELIZE 164.0 ... 0.00 NaN \n",
"8392 75.0 BELIZE 164.0 ... 6.00 3.04 \n",
"8421 393.0 CAYO 123.0 ... 11.25 3.75 \n",
"8442 75.0 BELIZE 164.0 ... 3.00 1.90 \n",
"8443 NaN NaN NaN ... NaN NaN \n",
"\n",
" COURSECODE COURSETITLE COURSEGRADE COURSECREDITS \\\n",
"54 CMPS416 COMPILER CONSTRUCTION B 3.0 \n",
"103 CMPS3232 SYSTEMS ADMINISTRATION F 3.0 \n",
"107 CMPS247 COMPUTER NETWORKING I A 3.0 \n",
"118 CMPS328 DATABASE MGMT. SYS. II C+ 3.0 \n",
"136 CMPS328 DATABASE MGMT. SYS. II C+ 3.0 \n",
"... ... ... ... ... \n",
"8366 MATH3251 CALCULUS III W 3.0 \n",
"8392 MATH3251 CALCULUS III C 3.0 \n",
"8421 CMPS417 JAVA PROGRAMMING A- 3.0 \n",
"8442 MATH2201 CALCULUS II D 3.0 \n",
"8443 NaN NaN NaN NaN \n",
"\n",
" COURSEPOINTS COURSEGPA COMMENTS CGPA \n",
"54 9.00 3.00 NaN 3.32 \n",
"103 0.00 0.00 NaN 1.33 \n",
"107 12.00 4.00 NaN 3.62 \n",
"118 7.50 2.50 NaN 1.23 \n",
"136 7.50 2.50 NaN 3.29 \n",
"... ... ... ... ... \n",
"8366 0.00 0.00 NaN 3.08 \n",
"8392 6.00 2.00 NaN 3.05 \n",
"8421 11.25 3.75 NaN 3.73 \n",
"8442 3.00 1.00 NaN 2.01 \n",
"8443 NaN NaN NaN NaN \n",
"\n",
"[436 rows x 33 columns]"
],
"text/html": [
"\n",
" <div id=\"df-2f81aad2-ff37-4f6e-a939-8ad1ca43adb5\">\n",
" <div 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>STUID</th>\n",
" <th>DOB</th>\n",
" <th>GENDER</th>\n",
" <th>ETHNICITYID</th>\n",
" <th>ETHNICITY</th>\n",
" <th>CITYID</th>\n",
" <th>CITY</th>\n",
" <th>DISTRICTID</th>\n",
" <th>DISTRICT</th>\n",
" <th>FEEDERID</th>\n",
" <th>...</th>\n",
" <th>SEMESTERPOINTS</th>\n",
" <th>SEMESTERGPA</th>\n",
" <th>COURSECODE</th>\n",
" <th>COURSETITLE</th>\n",
" <th>COURSEGRADE</th>\n",
" <th>COURSECREDITS</th>\n",
" <th>COURSEPOINTS</th>\n",
" <th>COURSEGPA</th>\n",
" <th>COMMENTS</th>\n",
" <th>CGPA</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>54</th>\n",
" <td>19</td>\n",
" <td>12/27/1980</td>\n",
" <td>F</td>\n",
" <td>13.0</td>\n",
" <td>Mestizo</td>\n",
" <td>52,456</td>\n",
" <td>ORANGE WALK</td>\n",
" <td>25.0</td>\n",
" <td>ORANGE WALK</td>\n",
" <td>164.0</td>\n",
" <td>...</td>\n",
" <td>9.00</td>\n",
" <td>3.65</td>\n",
" <td>CMPS416</td>\n",
" <td>COMPILER CONSTRUCTION</td>\n",
" <td>B</td>\n",
" <td>3.0</td>\n",
" <td>9.00</td>\n",
" <td>3.00</td>\n",
" <td>NaN</td>\n",
" <td>3.32</td>\n",
" </tr>\n",
" <tr>\n",
" <th>103</th>\n",
" <td>56</td>\n",
" <td>10/30/1981</td>\n",
" <td>M</td>\n",
" <td>13.0</td>\n",
" <td>Mestizo</td>\n",
" <td>52,997</td>\n",
" <td>BELMOPAN CITY</td>\n",
" <td>393.0</td>\n",
" <td>CAYO</td>\n",
" <td>164.0</td>\n",
" <td>...</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>CMPS3232</td>\n",
" <td>SYSTEMS ADMINISTRATION</td>\n",
" <td>F</td>\n",
" <td>3.0</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>NaN</td>\n",
" <td>1.33</td>\n",
" </tr>\n",
" <tr>\n",
" <th>107</th>\n",
" <td>105</td>\n",
" <td>5/31/1976</td>\n",
" <td>M</td>\n",
" <td>16.0</td>\n",
" <td>Unknown</td>\n",
" <td>53,550</td>\n",
" <td>CAYO</td>\n",
" <td>75.0</td>\n",
" <td>BELIZE</td>\n",
" <td>165.0</td>\n",
" <td>...</td>\n",
" <td>12.00</td>\n",
" <td>3.75</td>\n",
" <td>CMPS247</td>\n",
" <td>COMPUTER NETWORKING I</td>\n",
" <td>A</td>\n",
" <td>3.0</td>\n",
" <td>12.00</td>\n",
" <td>4.00</td>\n",
" <td>NaN</td>\n",
" <td>3.62</td>\n",
" </tr>\n",
" <tr>\n",
" <th>118</th>\n",
" <td>109</td>\n",
" <td>8/4/1981</td>\n",
" <td>M</td>\n",
" <td>16.0</td>\n",
" <td>Unknown</td>\n",
" <td>53,550</td>\n",
" <td>CAYO</td>\n",
" <td>75.0</td>\n",
" <td>BELIZE</td>\n",
" <td>162.0</td>\n",
" <td>...</td>\n",
" <td>7.50</td>\n",
" <td>2.00</td>\n",
" <td>CMPS328</td>\n",
" <td>DATABASE MGMT. SYS. II</td>\n",
" <td>C+</td>\n",
" <td>3.0</td>\n",
" <td>7.50</td>\n",
" <td>2.50</td>\n",
" <td>NaN</td>\n",
" <td>1.23</td>\n",
" </tr>\n",
" <tr>\n",
" <th>136</th>\n",
" <td>120</td>\n",
" <td>1/3/1983</td>\n",
" <td>F</td>\n",
" <td>8.0</td>\n",
" <td>Creole</td>\n",
" <td>53,222</td>\n",
" <td>BELIZE CITY</td>\n",
" <td>75.0</td>\n",
" <td>BELIZE</td>\n",
" <td>164.0</td>\n",
" <td>...</td>\n",
" <td>7.50</td>\n",
" <td>3.70</td>\n",
" <td>CMPS328</td>\n",
" <td>DATABASE MGMT. SYS. II</td>\n",
" <td>C+</td>\n",
" <td>3.0</td>\n",
" <td>7.50</td>\n",
" <td>2.50</td>\n",
" <td>NaN</td>\n",
" <td>3.29</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8366</th>\n",
" <td>8340</td>\n",
" <td>7/9/1979</td>\n",
" <td>M</td>\n",
" <td>13.0</td>\n",
" <td>Mestizo</td>\n",
" <td>53,222</td>\n",
" <td>BELIZE CITY</td>\n",
" <td>75.0</td>\n",
" <td>BELIZE</td>\n",
" <td>164.0</td>\n",
" <td>...</td>\n",
" <td>0.00</td>\n",
" <td>NaN</td>\n",
" <td>MATH3251</td>\n",
" <td>CALCULUS III</td>\n",
" <td>W</td>\n",
" <td>3.0</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>NaN</td>\n",
" <td>3.08</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8392</th>\n",
" <td>8368</td>\n",
" <td>2/24/1981</td>\n",
" <td>F</td>\n",
" <td>16.0</td>\n",
" <td>Unknown</td>\n",
" <td>53,222</td>\n",
" <td>BELIZE CITY</td>\n",
" <td>75.0</td>\n",
" <td>BELIZE</td>\n",
" <td>164.0</td>\n",
" <td>...</td>\n",
" <td>6.00</td>\n",
" <td>3.04</td>\n",
" <td>MATH3251</td>\n",
" <td>CALCULUS III</td>\n",
" <td>C</td>\n",
" <td>3.0</td>\n",
" <td>6.00</td>\n",
" <td>2.00</td>\n",
" <td>NaN</td>\n",
" <td>3.05</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8421</th>\n",
" <td>8394</td>\n",
" <td>1/27/1979</td>\n",
" <td>M</td>\n",
" <td>7.0</td>\n",
" <td>Caucasian</td>\n",
" <td>52,997</td>\n",
" <td>BELMOPAN CITY</td>\n",
" <td>393.0</td>\n",
" <td>CAYO</td>\n",
" <td>123.0</td>\n",
" <td>...</td>\n",
" <td>11.25</td>\n",
" <td>3.75</td>\n",
" <td>CMPS417</td>\n",
" <td>JAVA PROGRAMMING</td>\n",
" <td>A-</td>\n",
" <td>3.0</td>\n",
" <td>11.25</td>\n",
" <td>3.75</td>\n",
" <td>NaN</td>\n",
" <td>3.73</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8442</th>\n",
" <td>8423</td>\n",
" <td>6/13/1978</td>\n",
" <td>F</td>\n",
" <td>8.0</td>\n",
" <td>Creole</td>\n",
" <td>53,222</td>\n",
" <td>BELIZE CITY</td>\n",
" <td>75.0</td>\n",
" <td>BELIZE</td>\n",
" <td>164.0</td>\n",
" <td>...</td>\n",
" <td>3.00</td>\n",
" <td>1.90</td>\n",
" <td>MATH2201</td>\n",
" <td>CALCULUS II</td>\n",
" <td>D</td>\n",
" <td>3.0</td>\n",
" <td>3.00</td>\n",
" <td>1.00</td>\n",
" <td>NaN</td>\n",
" <td>2.01</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8443</th>\n",
" <td>1</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>...</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",
" </tbody>\n",
"</table>\n",
"<p>436 rows × 33 columns</p>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-2f81aad2-ff37-4f6e-a939-8ad1ca43adb5')\"\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 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\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",
" [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-2f81aad2-ff37-4f6e-a939-8ad1ca43adb5 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-2f81aad2-ff37-4f6e-a939-8ad1ca43adb5');\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",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 4
}
],
"source": [
"bint_students = bint_df.drop_duplicates(subset = \"STUID\", keep = \"last\")\n",
"bint_students"
]
},
{
"cell_type": "markdown",
"id": "b5ec56cf",
"metadata": {
"id": "b5ec56cf"
},
"source": [
"### Total number of students enrolled"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "05cbf18c",
"metadata": {
"id": "05cbf18c",
"outputId": "f335e9fa-5731-4aad-efcb-7e35e3d3b86f",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"436"
]
},
"metadata": {},
"execution_count": 5
}
],
"source": [
"bint_students.shape[0]"
]
},
{
"cell_type": "markdown",
"id": "a0626f0e",
"metadata": {
"id": "a0626f0e"
},
"source": [
"### Total number of students that Graduated and Dropped"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "36a2a1f6",
"metadata": {
"id": "36a2a1f6",
"outputId": "4b85e493-a611-4d09-bb82-c8f10da53e7d",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"PROGRAMSTATUS\n",
"Dropped 45\n",
"Graduated 233\n",
"In Process 64\n",
"Terminated 87\n",
"Transferred 5\n",
"terminated 1\n",
"Name: PROGRAMSTATUS, dtype: int64"
]
},
"metadata": {},
"execution_count": 6
}
],
"source": [
"bint_students.groupby(\"PROGRAMSTATUS\")[\"PROGRAMSTATUS\"].count()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "26b0e73a",
"metadata": {
"id": "26b0e73a",
"outputId": "fb0b89fc-a86f-41c5-e2fd-facc1c5e8ccc",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"233"
]
},
"metadata": {},
"execution_count": 7
}
],
"source": [
"bint_students.loc[bint_students[\"PROGRAMSTATUS\"] == \"Graduated\"].shape[0]"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "936fdeaa",
"metadata": {
"id": "936fdeaa",
"outputId": "686078e9-0005-422f-d250-28999b96f113",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"45"
]
},
"metadata": {},
"execution_count": 8
}
],
"source": [
"bint_students.loc[bint_students[\"PROGRAMSTATUS\"] == \"Dropped\"].shape[0]"
]
},
{
"cell_type": "markdown",
"id": "46907a3f",
"metadata": {
"id": "46907a3f"
},
"source": [
"### Courses offered in BINT"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "580550bd",
"metadata": {
"id": "580550bd",
"outputId": "cdc046a7-3af5-46ca-973d-bc770b6d9c53",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 424
}
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" COURSECODE COURSETITLE\n",
"363 CMPS150 COMPUTER BUSINESS APPLICATION\n",
"4263 CMPS411 COMPUTER NETWORK SECURITY\n",
"4430 CMPS321 TELECOMMUNICATIONS SYSTEMS\n",
"4438 CMPS317 ADVANCED GUI DEVELOPMENT\n",
"5715 CMPS1024 COMPUTER BUSINESS APPLICATIONS\n",
"... ... ...\n",
"8431 CMPS4251 COMPUTER AND NETWORK SECURITY\n",
"8432 CMPS2151 WEB DEVELOPMENT\n",
"8434 CMPS4111 DATABASE MANAGEMENT SYSTEMS II\n",
"8438 CMPS1131 PROGRAMMING I\n",
"8439 CMPS3151 TELECOMMUNICATION\n",
"\n",
"[67 rows x 2 columns]"
],
"text/html": [
"\n",
" <div id=\"df-1c48b20e-1867-4d1c-8cc9-2ceab53aabd9\">\n",
" <div 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>COURSECODE</th>\n",
" <th>COURSETITLE</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>363</th>\n",
" <td>CMPS150</td>\n",
" <td>COMPUTER BUSINESS APPLICATION</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4263</th>\n",
" <td>CMPS411</td>\n",
" <td>COMPUTER NETWORK SECURITY</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4430</th>\n",
" <td>CMPS321</td>\n",
" <td>TELECOMMUNICATIONS SYSTEMS</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4438</th>\n",
" <td>CMPS317</td>\n",
" <td>ADVANCED GUI DEVELOPMENT</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5715</th>\n",
" <td>CMPS1024</td>\n",
" <td>COMPUTER BUSINESS APPLICATIONS</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8431</th>\n",
" <td>CMPS4251</td>\n",
" <td>COMPUTER AND NETWORK SECURITY</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8432</th>\n",
" <td>CMPS2151</td>\n",
" <td>WEB DEVELOPMENT</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8434</th>\n",
" <td>CMPS4111</td>\n",
" <td>DATABASE MANAGEMENT SYSTEMS II</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8438</th>\n",
" <td>CMPS1131</td>\n",
" <td>PROGRAMMING I</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8439</th>\n",
" <td>CMPS3151</td>\n",
" <td>TELECOMMUNICATION</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>67 rows × 2 columns</p>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-1c48b20e-1867-4d1c-8cc9-2ceab53aabd9')\"\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 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\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",
" [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-1c48b20e-1867-4d1c-8cc9-2ceab53aabd9 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-1c48b20e-1867-4d1c-8cc9-2ceab53aabd9');\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",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 9
}
],
"source": [
"course = bint_df.drop_duplicates(subset = \"COURSETITLE\", keep = \"last\")\n",
"courses = course.loc[:, \"COURSECODE\":\"COURSETITLE\"]\n",
"courses[courses['COURSECODE'].str.contains('CMPS', na=False)]"
]
},
{
"cell_type": "markdown",
"id": "10d26294",
"metadata": {
"id": "10d26294"
},
"source": [
"### Where are the students coming from"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "ebcd8d8e",
"metadata": {
"id": "ebcd8d8e",
"outputId": "df3f47df-2baf-47ed-f8d8-f4ca15ceaad7",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"DISTRICT\n",
"CAYO 173\n",
"BELIZE 151\n",
"ORANGE WALK 40\n",
"STANN CREEK 34\n",
"COROZAL 24\n",
"TOLEDO 9\n",
"NIGERIA 2\n",
"465 1\n",
"Name: DISTRICT, dtype: int64"
]
},
"metadata": {},
"execution_count": 10
}
],
"source": [
"bint_students.groupby(\"DISTRICT\")[\"DISTRICT\"].count().sort_values(ascending=False)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "51f478de",
"metadata": {
"id": "51f478de",
"outputId": "e10dad8b-fceb-4ff3-abb3-c5dafc745ec2",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"FEEDER\n",
"UNIVERSITY OF BELIZE 209\n",
"ST. JOHN'S COLLEGE JUNIOR COLLEGE 65\n",
"SACRED HEART JUNIOR COLLEGE 26\n",
"ESCUELA MEXICO JR COLLEGE 13\n",
"COROZAL JUNIOR COLLEGE 12\n",
"MUFFLES JUNIOR COLLEGE 10\n",
" WESLEY JUNIOR COLLEGE 10\n",
"BELMOPAN COMPREHENSIVE SCHOOL 9\n",
"FOREIGN 8\n",
"*UNKNOWN 8\n",
"INDEPENDENCE JUNIOR COLLEGE 7\n",
" STANN CREEK ECUMENICAL HIGH SC 6\n",
"SACRED HEART COLLEGE 5\n",
"STANN CREEK ECUMENICAL JR. COLLEGE 5\n",
"BELMOPAN JUNIOR COLLEGE 4\n",
"BELIZE ADVENTIST JUNIOR COLLEGE 4\n",
"BELIZE ADVENTIST COLLEGE 3\n",
"BELIZE TECHNICAL COLLEGE 3\n",
"UNIVERSITY COLLEGE OF BELIZE 3\n",
"BELIZE CHRISTIAN ACADEMY 3\n",
"ST. CATHERINE ACADEMY 3\n",
"EDWARD P. YORKE 2\n",
"ST. JOHN'S COLLEGE 2\n",
"ADULT & CONTINUING EDUCATION 1\n",
"TOLEDO COMMUNITY COLLEGE 1\n",
"EDEN SDA HIGH 1\n",
"OUR LADY OF GUADALUPE HIGH SCH 1\n",
"MOPAN TECHNICAL HIGH SCHOOL 1\n",
"LADYVILLE TECHNICAL HIGH 1\n",
"BELIZE COLLEGE OF AGRICULTURE 1\n",
"UNIVERSITY OF THE WEST INDIES 1\n",
"Name: FEEDER, dtype: int64"
]
},
"metadata": {},
"execution_count": 11
}
],
"source": [
"bint_students.groupby(\"FEEDER\")[\"FEEDER\"].count().sort_values(ascending=False)"
]
},
{
"cell_type": "markdown",
"id": "62ded6fe",
"metadata": {
"id": "62ded6fe"
},
"source": [
"### How long on average to graduate from BINT "
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "c1ecb073",
"metadata": {
"id": "c1ecb073"
},
"outputs": [],
"source": [
"graduated_students = bint_students.loc[bint_students[\"PROGRAMSTATUS\"] == \"Graduated\"].copy()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "02074873",
"metadata": {
"id": "02074873"
},
"outputs": [],
"source": [
"graduated_students[\"PROGRAMSTART\"] = pd.to_datetime(graduated_students[\"PROGRAMSTART\"])\n",
"graduated_students[\"PROGRAMEND\"] = pd.to_datetime(graduated_students[\"PROGRAMEND\"])"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "eede9721",
"metadata": {
"id": "eede9721"
},
"outputs": [],
"source": [
"graduated_students['dif'] = graduated_students['PROGRAMEND'] - graduated_students['PROGRAMSTART']"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "e1ff82f0",
"metadata": {
"id": "e1ff82f0",
"outputId": "6297c63c-86cc-4b60-8ffd-6dcfa7536a44",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"2.887128814206306"
]
},
"metadata": {},
"execution_count": 15
}
],
"source": [
"graduated_students['diff_year'] = graduated_students['dif'] / np.timedelta64(1, 'Y')\n",
"graduated_students['diff_year'].mean()"
]
},
{
"cell_type": "markdown",
"source": [
"## Average GPA"
],
"metadata": {
"id": "eMXabPQwRHNy"
},
"id": "eMXabPQwRHNy"
},
{
"cell_type": "code",
"source": [
"bint_students[\"SEMESTERGPA\"].mean().round(3)"
],
"metadata": {
"id": "0PfvCSO3RRsx",
"outputId": "e7f5a9dd-997b-4c16-96b6-c0616ce72c31",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"id": "0PfvCSO3RRsx",
"execution_count": 16,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"2.876"
]
},
"metadata": {},
"execution_count": 16
}
]
},
{
"cell_type": "markdown",
"source": [
"## Gender and Ethnicity"
],
"metadata": {
"id": "RieBl07gTg7K"
},
"id": "RieBl07gTg7K"
},
{
"cell_type": "code",
"source": [
"bint_students.groupby(\"GENDER\")[\"GENDER\"].count().sort_values(ascending=False)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "7A3lZLv-TkqO",
"outputId": "a2578174-cd6b-4375-e106-b915dfa28d7f"
},
"id": "7A3lZLv-TkqO",
"execution_count": 17,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"GENDER\n",
"M 339\n",
"F 96\n",
"Name: GENDER, dtype: int64"
]
},
"metadata": {},
"execution_count": 17
}
]
},
{
"cell_type": "code",
"source": [
"ethnicity = bint_students['ETHNICITY'].unique()\n",
"x0 = ethnicity[~pd.isnull(ethnicity)] # Mask the elements --- This is the ethnicity\n",
"x0.sort() # Sort to match pairs correctly\n",
"\n",
"\n",
"x1 = bint_students.groupby('ETHNICITY').agg({'ETHNICITY': 'count'}).values.flatten() # --- This is who all enrolled\n",
"\n",
"x2 = bint_students[bint_students['PROGRAMSTATUS'].eq('Graduated')] # --- This is who all graduated\n",
"x2 = x2.groupby('ETHNICITY').agg({'ETHNICITY': 'count'}).values.flatten()\n",
"x2 = np.insert(x2, 4, 0) # Patch lol\n",
"\n",
"\n",
"# Create the dataframe\n",
"df2 = pd.DataFrame({\"Ethnicity\": x0, \"Total Enrolled Students\": x1, \"Total Graduated Students\": x2})\n",
"df2 # Print it out"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 363
},
"id": "6lEDhxW2VH8k",
"outputId": "269c0a88-10d2-469c-aa86-a25e148b3a97"
},
"id": "6lEDhxW2VH8k",
"execution_count": 18,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Ethnicity Total Enrolled Students Total Graduated Students\n",
"0 Caucasian 2 2\n",
"1 Creole 117 57\n",
"2 East Indian 15 7\n",
"3 Garifuna 19 11\n",
"4 Ketchi 1 0\n",
"5 Mayan 15 9\n",
"6 Mestizo 175 88\n",
"7 Oriental 23 21\n",
"8 Other 40 21\n",
"9 Unknown 28 17"
],
"text/html": [
"\n",
" <div id=\"df-05a2e2e5-4da9-4631-9856-22d8f2e91c83\">\n",
" <div 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>Ethnicity</th>\n",
" <th>Total Enrolled Students</th>\n",
" <th>Total Graduated Students</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Caucasian</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Creole</td>\n",
" <td>117</td>\n",
" <td>57</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>East Indian</td>\n",
" <td>15</td>\n",
" <td>7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Garifuna</td>\n",
" <td>19</td>\n",
" <td>11</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Ketchi</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>Mayan</td>\n",
" <td>15</td>\n",
" <td>9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>Mestizo</td>\n",
" <td>175</td>\n",
" <td>88</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>Oriental</td>\n",
" <td>23</td>\n",
" <td>21</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>Other</td>\n",
" <td>40</td>\n",
" <td>21</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>Unknown</td>\n",
" <td>28</td>\n",
" <td>17</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-05a2e2e5-4da9-4631-9856-22d8f2e91c83')\"\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 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\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",
" [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-05a2e2e5-4da9-4631-9856-22d8f2e91c83 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-05a2e2e5-4da9-4631-9856-22d8f2e91c83');\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",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 18
}
]
},
{
"cell_type": "code",
"source": [
"gender = bint_students['GENDER'].unique()\n",
"gender = gender[~pd.isnull(gender)] # Remove the NaNs\n",
"gender.sort() # Sort ascending\n",
"\n",
"\n",
"# Intermediates (Males)\n",
"eM = bint_students[bint_students['GENDER'].eq('M')].agg({'STUID': 'count'}).unique() # --- This is who all enrolled (Males)\n",
"gM = bint_students[bint_students['PROGRAMSTATUS'].eq('Graduated') & bint_students['GENDER'].eq('M')].agg({'STUID': 'count'}).unique() # --- This is who all graduated (Males)\n",
"\n",
"\n",
"# Intermediates (Females)\n",
"eF = bint_students[~bint_students['GENDER'].eq('M')].agg({'STUID': 'count'}).unique() # --- This is who all enrolled (Females)\n",
"gF = bint_students[bint_students['PROGRAMSTATUS'].eq('Graduated') & ~bint_students['GENDER'].eq('M')].agg({'STUID': 'count'}).unique() # --- This is who all graduated (Females)\n",
"\n",
"enrolled = np.array([eF, eM]).flatten()\n",
"graduated = np.array([gF, gM]).flatten()\n",
"# Create the dataframe\n",
"df2 = pd.DataFrame({\"Gender\": gender, \"Total Enrolled Students\": enrolled, \"Total Graduated Students\": graduated})\n",
"df2 # Print it out"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 112
},
"id": "tj3alKxA2bMm",
"outputId": "b70e503e-0a1b-4e8d-c42d-742ec5082403"
},
"id": "tj3alKxA2bMm",
"execution_count": 60,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Gender Total Enrolled Students Total Graduated Students\n",
"0 F 97 57\n",
"1 M 339 176"
],
"text/html": [
"\n",
" <div id=\"df-4b10cf23-35c9-4de6-8206-af6732620dd6\">\n",
" <div 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>Gender</th>\n",
" <th>Total Enrolled Students</th>\n",
" <th>Total Graduated Students</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>F</td>\n",
" <td>97</td>\n",
" <td>57</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>M</td>\n",
" <td>339</td>\n",
" <td>176</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-4b10cf23-35c9-4de6-8206-af6732620dd6')\"\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 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\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",
" [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-4b10cf23-35c9-4de6-8206-af6732620dd6 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-4b10cf23-35c9-4de6-8206-af6732620dd6');\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",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 60
}
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.9.11"
},
"colab": {
"provenance": [],
"include_colab_link": true
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment