Commit 2800af91 by Prayush Kumar

Remove preliminary notebook to avoid confusion

parent b673cde1
Showing with 0 additions and 1650 deletions
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import random\n",
"import copy\n",
"import datetime\n",
"\n",
"# Set RNG seed using Aug 1, 2023 9am\n",
"random.seed(int(datetime.datetime(2024, 4, 4, 12, 0, 0, 0).timestamp()))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Housing for postdocs"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"input_csv = '/home/prayush/Documents/ICTS/ICTSHousingCell/icts-housing/Housing allotment request form- Graduate students (March 2024) (Responses) - Form Responses 1.csv'\n",
"raw_responses = pd.read_csv(input_csv)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"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>Timestamp</th>\n",
" <th>Email Address</th>\n",
" <th>Name</th>\n",
" <th>Program enrolled</th>\n",
" <th>Year of Study</th>\n",
" <th>Are you a female student?</th>\n",
" <th>Please indicate your order of preference for campus housing [On-campus accommodation]</th>\n",
" <th>Please indicate your order of preference for campus housing [Hostel 1]</th>\n",
" <th>Please indicate your order of preference for campus housing [Hostel 2]</th>\n",
" <th>Please indicate your order of preference for campus housing [Hostel 3]</th>\n",
" <th>Please indicate your order of preference for campus housing [Hostel 4]</th>\n",
" <th>Please indicate your order of preference for campus housing [Hostel 5]</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>3/9/2024 8:11:47</td>\n",
" <td>anikat.kankaria@icts.res.in</td>\n",
" <td>Anikat kankaria</td>\n",
" <td>IPhD</td>\n",
" <td>Second year</td>\n",
" <td>No</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>3/9/2024 8:26:42</td>\n",
" <td>sourabh.saini@icts.res.in</td>\n",
" <td>Sourabh Saini</td>\n",
" <td>PhD</td>\n",
" <td>First year</td>\n",
" <td>No</td>\n",
" <td>1.0</td>\n",
" <td>5.0</td>\n",
" <td>6.0</td>\n",
" <td>3.0</td>\n",
" <td>4.0</td>\n",
" <td>2.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3/9/2024 9:20:14</td>\n",
" <td>aiswarya.ns@icts.res.in</td>\n",
" <td>Aiswarya N S</td>\n",
" <td>IPhD</td>\n",
" <td>Second year</td>\n",
" <td>Yes</td>\n",
" <td>1.0</td>\n",
" <td>3.0</td>\n",
" <td>2.0</td>\n",
" <td>6.0</td>\n",
" <td>5.0</td>\n",
" <td>4.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3/9/2024 9:38:05</td>\n",
" <td>avi.wadhwa@icts.res.in</td>\n",
" <td>Avi Wadhwa</td>\n",
" <td>PhD</td>\n",
" <td>Third year</td>\n",
" <td>No</td>\n",
" <td>NaN</td>\n",
" <td>2.0</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>3/9/2024 9:39:41</td>\n",
" <td>naveen.kumard@icts.res.in</td>\n",
" <td>Naveen Kumar D</td>\n",
" <td>PhD</td>\n",
" <td>First year</td>\n",
" <td>No</td>\n",
" <td>5.0</td>\n",
" <td>2.0</td>\n",
" <td>1.0</td>\n",
" <td>6.0</td>\n",
" <td>4.0</td>\n",
" <td>3.0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Timestamp Email Address Name \\\n",
"0 3/9/2024 8:11:47 anikat.kankaria@icts.res.in Anikat kankaria \n",
"1 3/9/2024 8:26:42 sourabh.saini@icts.res.in Sourabh Saini \n",
"2 3/9/2024 9:20:14 aiswarya.ns@icts.res.in Aiswarya N S \n",
"3 3/9/2024 9:38:05 avi.wadhwa@icts.res.in Avi Wadhwa \n",
"4 3/9/2024 9:39:41 naveen.kumard@icts.res.in Naveen Kumar D \n",
"\n",
" Program enrolled Year of Study Are you a female student? \\\n",
"0 IPhD Second year No \n",
"1 PhD First year No \n",
"2 IPhD Second year Yes \n",
"3 PhD Third year No \n",
"4 PhD First year No \n",
"\n",
" Please indicate your order of preference for campus housing [On-campus accommodation] \\\n",
"0 1.0 \n",
"1 1.0 \n",
"2 1.0 \n",
"3 NaN \n",
"4 5.0 \n",
"\n",
" Please indicate your order of preference for campus housing [Hostel 1] \\\n",
"0 NaN \n",
"1 5.0 \n",
"2 3.0 \n",
"3 2.0 \n",
"4 2.0 \n",
"\n",
" Please indicate your order of preference for campus housing [Hostel 2] \\\n",
"0 NaN \n",
"1 6.0 \n",
"2 2.0 \n",
"3 1.0 \n",
"4 1.0 \n",
"\n",
" Please indicate your order of preference for campus housing [Hostel 3] \\\n",
"0 2.0 \n",
"1 3.0 \n",
"2 6.0 \n",
"3 NaN \n",
"4 6.0 \n",
"\n",
" Please indicate your order of preference for campus housing [Hostel 4] \\\n",
"0 NaN \n",
"1 4.0 \n",
"2 5.0 \n",
"3 NaN \n",
"4 4.0 \n",
"\n",
" Please indicate your order of preference for campus housing [Hostel 5] \n",
"0 NaN \n",
"1 2.0 \n",
"2 4.0 \n",
"3 NaN \n",
"4 3.0 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"raw_responses.head()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# Replacing empty entries with a constant number that is large enough,\n",
"# This amounts to treating those choices for which students have filled\n",
"# no preferences as being equally preferred by them\n",
"nan_value = 99\n",
"proc_responses = raw_responses.replace(np.nan, nan_value)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 Timestamp\n",
"1 Email Address\n",
"2 Name\n",
"3 Program enrolled\n",
"4 Year of Study\n",
"5 Are you a female student?\n",
"6 Please indicate your order of preference for campus housing [On-campus accommodation]\n",
"7 Please indicate your order of preference for campus housing [Hostel 1]\n",
"8 Please indicate your order of preference for campus housing [Hostel 2]\n",
"9 Please indicate your order of preference for campus housing [Hostel 3]\n",
"10 Please indicate your order of preference for campus housing [Hostel 4]\n",
"11 Please indicate your order of preference for campus housing [Hostel 5]\n"
]
}
],
"source": [
"# Standardizing column names to be used in rest of the notebook\n",
"for idx, cname in enumerate(proc_responses.columns):\n",
" print(idx, cname)\n",
"\n",
"col_names = list(proc_responses.columns)\n",
"\n",
"proc_responses = proc_responses.rename(columns={\n",
" col_names[1]: 'email',\n",
" col_names[2]: 'name',\n",
" col_names[4]: 'year',\n",
" col_names[3]: 'course',\n",
" col_names[5]: 'female',\n",
" \n",
" col_names[6]: 'housing0',\n",
" col_names[7]: 'housing1',\n",
" col_names[8]: 'housing2',\n",
" col_names[9]: 'housing3',\n",
" col_names[10]: 'housing4',\n",
" col_names[11]: 'housing5',\n",
"})"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"# Combine the preference order for every person into a single list,\n",
"# as is needed by stuff below, and add it as a new column\n",
"new_col = []\n",
"for idx in range(len(proc_responses)):\n",
" new_col.append(\n",
" list(np.array(proc_responses[[\n",
" 'housing0',\n",
" 'housing1',\n",
" 'housing2',\n",
" 'housing3',\n",
" 'housing4',\n",
" 'housing5',\n",
" ]].iloc[idx].to_list()).astype('int'))\n",
" )\n",
"\n",
"proc_responses['housing_ranking'] = new_col\n",
"\n",
"\n",
"preferences = []\n",
"for input_pref in new_col:\n",
" pref_order = [-1] * len(input_pref)\n",
" for idx, val in enumerate(input_pref):\n",
" if val <= len(input_pref):\n",
" pref_order[val - 1] = idx\n",
"\n",
" for idx, val in enumerate(input_pref):\n",
" if val > len(input_pref):\n",
" pref_order[len(pref_order) - 1 - pref_order[::-1].index(-1)] = idx\n",
"\n",
" preferences.append(pref_order)\n",
" \n",
"\n",
"proc_responses['preferences'] = preferences"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"# Since everyone here is a student\n",
"proc_responses['student_or_postdoc'] = [\"student\"] * len(proc_responses)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"# Replace gender responses from English to integers\n",
"numeric_response = []\n",
"for x in proc_responses['female'].to_list():\n",
" if type(x) is int:\n",
" numeric_response.append(0) # blank -> Nan -> 99 -> 0\n",
" elif x.lower() == 'yes':\n",
" numeric_response.append(1)\n",
" else:\n",
" numeric_response.append(0)\n",
"proc_responses['female'] = numeric_response"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"# Replace year of study response from English to integers\n",
"new_col = []\n",
"for r in proc_responses['year'].to_list():\n",
" r = str(r)\n",
" if 'first' in r.lower():\n",
" new_col.append(1)\n",
" elif 'second' in r.lower():\n",
" new_col.append(2)\n",
" elif 'third' in r.lower():\n",
" new_col.append(3)\n",
" elif 'fourth' in r.lower():\n",
" new_col.append(4)\n",
" elif 'fifth' in r.lower():\n",
" new_col.append(5)\n",
" elif 'sixth' in r.lower():\n",
" new_col.append(6)\n",
" elif 'seven' in r.lower():\n",
" new_col.append(7)\n",
" else:\n",
" print(f\"Whoa - weird response for year of study: {r}\")\n",
" new_col.append\n",
"proc_responses['year'] = new_col"
]
},
{
"cell_type": "code",
"execution_count": 10,
"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>Timestamp</th>\n",
" <th>email</th>\n",
" <th>name</th>\n",
" <th>course</th>\n",
" <th>year</th>\n",
" <th>female</th>\n",
" <th>housing0</th>\n",
" <th>housing1</th>\n",
" <th>housing2</th>\n",
" <th>housing3</th>\n",
" <th>housing4</th>\n",
" <th>housing5</th>\n",
" <th>housing_ranking</th>\n",
" <th>preferences</th>\n",
" <th>student_or_postdoc</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>3/9/2024 8:11:47</td>\n",
" <td>anikat.kankaria@icts.res.in</td>\n",
" <td>Anikat kankaria</td>\n",
" <td>IPhD</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>1.0</td>\n",
" <td>99.0</td>\n",
" <td>99.0</td>\n",
" <td>2.0</td>\n",
" <td>99.0</td>\n",
" <td>99.0</td>\n",
" <td>[1, 99, 99, 2, 99, 99]</td>\n",
" <td>[0, 3, 5, 4, 2, 1]</td>\n",
" <td>student</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>3/9/2024 8:26:42</td>\n",
" <td>sourabh.saini@icts.res.in</td>\n",
" <td>Sourabh Saini</td>\n",
" <td>PhD</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>1.0</td>\n",
" <td>5.0</td>\n",
" <td>6.0</td>\n",
" <td>3.0</td>\n",
" <td>4.0</td>\n",
" <td>2.0</td>\n",
" <td>[1, 5, 6, 3, 4, 2]</td>\n",
" <td>[0, 5, 3, 4, 1, 2]</td>\n",
" <td>student</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3/9/2024 9:20:14</td>\n",
" <td>aiswarya.ns@icts.res.in</td>\n",
" <td>Aiswarya N S</td>\n",
" <td>IPhD</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>1.0</td>\n",
" <td>3.0</td>\n",
" <td>2.0</td>\n",
" <td>6.0</td>\n",
" <td>5.0</td>\n",
" <td>4.0</td>\n",
" <td>[1, 3, 2, 6, 5, 4]</td>\n",
" <td>[0, 2, 1, 5, 4, 3]</td>\n",
" <td>student</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3/9/2024 9:38:05</td>\n",
" <td>avi.wadhwa@icts.res.in</td>\n",
" <td>Avi Wadhwa</td>\n",
" <td>PhD</td>\n",
" <td>3</td>\n",
" <td>0</td>\n",
" <td>99.0</td>\n",
" <td>2.0</td>\n",
" <td>1.0</td>\n",
" <td>99.0</td>\n",
" <td>99.0</td>\n",
" <td>99.0</td>\n",
" <td>[99, 2, 1, 99, 99, 99]</td>\n",
" <td>[2, 1, 5, 4, 3, 0]</td>\n",
" <td>student</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>3/9/2024 9:39:41</td>\n",
" <td>naveen.kumard@icts.res.in</td>\n",
" <td>Naveen Kumar D</td>\n",
" <td>PhD</td>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>5.0</td>\n",
" <td>2.0</td>\n",
" <td>1.0</td>\n",
" <td>6.0</td>\n",
" <td>4.0</td>\n",
" <td>3.0</td>\n",
" <td>[5, 2, 1, 6, 4, 3]</td>\n",
" <td>[2, 1, 5, 4, 0, 3]</td>\n",
" <td>student</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Timestamp email name course \\\n",
"0 3/9/2024 8:11:47 anikat.kankaria@icts.res.in Anikat kankaria IPhD \n",
"1 3/9/2024 8:26:42 sourabh.saini@icts.res.in Sourabh Saini PhD \n",
"2 3/9/2024 9:20:14 aiswarya.ns@icts.res.in Aiswarya N S IPhD \n",
"3 3/9/2024 9:38:05 avi.wadhwa@icts.res.in Avi Wadhwa PhD \n",
"4 3/9/2024 9:39:41 naveen.kumard@icts.res.in Naveen Kumar D PhD \n",
"\n",
" year female housing0 housing1 housing2 housing3 housing4 housing5 \\\n",
"0 2 0 1.0 99.0 99.0 2.0 99.0 99.0 \n",
"1 1 0 1.0 5.0 6.0 3.0 4.0 2.0 \n",
"2 2 1 1.0 3.0 2.0 6.0 5.0 4.0 \n",
"3 3 0 99.0 2.0 1.0 99.0 99.0 99.0 \n",
"4 1 0 5.0 2.0 1.0 6.0 4.0 3.0 \n",
"\n",
" housing_ranking preferences student_or_postdoc \n",
"0 [1, 99, 99, 2, 99, 99] [0, 3, 5, 4, 2, 1] student \n",
"1 [1, 5, 6, 3, 4, 2] [0, 5, 3, 4, 1, 2] student \n",
"2 [1, 3, 2, 6, 5, 4] [0, 2, 1, 5, 4, 3] student \n",
"3 [99, 2, 1, 99, 99, 99] [2, 1, 5, 4, 3, 0] student \n",
"4 [5, 2, 1, 6, 4, 3] [2, 1, 5, 4, 0, 3] student "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"proc_responses.head()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"# Remove columns that we do not need going forward\n",
"final_responses = proc_responses[[\n",
" 'email', 'name', 'year', 'course', 'female', 'preferences', 'student_or_postdoc','housing_ranking'\n",
"]]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
" A simple CSV/XLSX file with at least the following columns (it can have additional columns, doesn't matter):\n",
"\n",
" Name, Year of study, Student or Postdoc, Female or not, Preferences, ..\n",
"\n",
" A sample entry would be:\n",
" Albert Einstein, 1, student, no, [0, 1, 2, 3, 4, 5, 6, 8, 7],\n",
"\n",
" Total number of available housing in each category.\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"inputs = final_responses.to_dict(orient='list')"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"for idx in range(len(inputs['name'])):\n",
" inputs['name'][idx] = inputs['name'][idx].lower().strip()\n",
" inputs['course'][idx] = inputs['course'][idx].lower().strip()\n",
" inputs['email'][idx] = inputs['email'][idx].lower().strip()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"From Veena:\n",
"\n",
"- On-campus = 15\n",
"- Hostel 1 = 0\n",
"- Hostel 2 = 24\n",
"- Hostel 3 = 36\n",
"- Hostel 4 = 22\n",
"- Hostel 5 = 42 \n"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"availability = {}\n",
"availability[\"student\"] = {0: 15, 1: 0, 2: 24, 3: 36, 4: 22, 5: 42}\n",
"# availability[\"postdoc\"] = {0: 14, 1: 1, 2: 1, 3: 3, 4: 5, 5: 22}"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"def get_info_for_person(person_name, col_name):\n",
" if person_name not in inputs[\"name\"]:\n",
" raise IOError(f\"We do not recognize name: {person_name}\")\n",
"\n",
" if col_name not in inputs:\n",
" raise IOError(f\"We were not provided with info: {col_name}\")\n",
"\n",
" idx_of_person = inputs[\"name\"].index(person_name)\n",
" return inputs[col_name][idx_of_person]\n",
"\n",
"\n",
"def get_pool_number_for_student(person_name):\n",
" pool_number = 3\n",
" if (get_info_for_person(person_name, \"female\") == 1) and (\n",
" get_info_for_person(person_name, \"year\") == 1\n",
" ):\n",
" pool_number = 1\n",
" elif (get_info_for_person(person_name, \"year\") == 1) or (\n",
" (\n",
" get_info_for_person(person_name, \"year\") >= 5\n",
" and get_info_for_person(person_name, \"course\").lower() == \"phd\"\n",
" )\n",
" or (\n",
" get_info_for_person(person_name, \"year\") >= 6\n",
" and get_info_for_person(person_name, \"course\").lower() == \"iphd\"\n",
" )\n",
" ):\n",
" pool_number = 2\n",
" return pool_number\n",
"\n",
"def get_pool_number_for_postdoc(person_name):\n",
" # FIXME: Everyone is equal?\n",
" return 1\n",
"\n",
"\n",
"def get_possible_pools():\n",
" return [1, 2, 3]"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"dict_keys(['email', 'name', 'year', 'course', 'female', 'preferences', 'student_or_postdoc', 'housing_ranking'])"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"inputs.keys()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Check if inputs look okay"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Housing preferences for 0, anikat.kankaria@icts.res.in are repeated: [1, 99, 99, 2, 99, 99]\n",
"Housing preferences for 3, avi.wadhwa@icts.res.in are repeated: [99, 2, 1, 99, 99, 99]\n",
"Housing preferences for 8, jyotirmoy.barman@icts.res.in are repeated: [2, 99, 3, 99, 99, 1]\n",
"Housing preferences for 11, uddeepta.deka@icts.res.in are repeated: [1, 3, 2, 99, 4, 99]\n",
"Housing preferences for 12, kaustubh.singhi@icts.res.in are repeated: [99, 2, 1, 99, 99, 99]\n",
"Housing preferences for 16, harsh.nigam@icts.res.in are repeated: [1, 99, 99, 2, 99, 99]\n",
"Housing preferences for 19, manish.jain@icts.res.in are repeated: [1, 2, 3, 4, 99, 99]\n",
"Housing preferences for 23, sandip.sahoo@icts.res.in are repeated: [6, 4, 2, 1, 3, 6]\n",
"Housing preferences for 24, umesh.kumar@icts.res.in are repeated: [3, 2, 4, 5, 1, 5]\n",
"Housing preferences for 26, muhammed.irshad@icts.res.in are repeated: [99, 3, 1, 4, 2, 99]\n",
"Housing preferences for 31, devanshi.parashar@icts.res.in are repeated: [99, 2, 1, 99, 99, 99]\n",
"Housing preferences for 36, ritwick.kumarghosh@icts.res.in are repeated: [99, 3, 2, 1, 4, 99]\n",
"Housing preferences for 38, ankush.chaubey@icts.res.in are repeated: [99, 99, 99, 1, 99, 99]\n",
"Housing preferences for 48, sparsh.gupta@icts.res.in are repeated: [99, 2, 99, 99, 1, 99]\n",
"Housing preferences for 50, ashik.h@icts.res.in are repeated: [99, 3, 4, 1, 2, 99]\n",
"Housing preferences for 51, aditya.sharma@icts.res.in are repeated: [99, 99, 99, 1, 99, 99]\n",
"Housing preferences for 52, saikat.santra@icts.res.in are repeated: [99, 99, 1, 2, 99, 99]\n",
"Housing preferences for 55, ritwik.mukherjee@icts.res.in are repeated: [99, 99, 1, 99, 99, 99]\n",
"Housing preferences for 66, rishabh.kaushik@icts.res.in are repeated: [1, 3, 2, 4, 99, 99]\n",
"Housing preferences for 68, swapan.limbu@icts.res.in are repeated: [6, 6, 6, 1, 6, 6]\n",
"Housing preferences for 70, priyanka.sinha@icts.res.in are repeated: [1, 3, 2, 99, 4, 99]\n",
"Inputs look good. We got 74 entries.\n"
]
}
],
"source": [
"total_number_of_people = len(inputs[\"name\"])\n",
"\n",
"for col_name in inputs:\n",
" if len(inputs[col_name]) != total_number_of_people:\n",
" raise IOError(\n",
" \"There are {} entries for column {}. We need {}.\".format(\n",
" len(inputs[col_name]), col_name, total_number_of_people\n",
" )\n",
" )\n",
" if col_name in ['name', 'email']:\n",
" if len(set(inputs[col_name])) != total_number_of_people:\n",
" tmp = []\n",
" for em in inputs[col_name]:\n",
" if em not in tmp:\n",
" tmp.append(em)\n",
" else: print(f\"In {col_name}: {em} is repeated!\")\n",
" raise IOError(\n",
" \"There are {} UNIQUE entries for column {}. We need {}.\".format(\n",
" len(set(inputs[col_name])), col_name, total_number_of_people\n",
" )\n",
" )\n",
" if col_name in ['housing_ranking']:\n",
" for i, ps in enumerate(inputs['housing_ranking']):\n",
" if len(ps) != len(set(ps)):\n",
" print(f\"Housing preferences for {i}, {inputs['email'][i]} are repeated: {ps}\")\n",
" \n",
"\n",
"print(f\"Inputs look good. We got {total_number_of_people} entries.\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Assign people to lottery pools"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"all_pools = {}"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Here are our assignments:\n",
"In pool 1, we have:\n",
" ['babli khatun', 'anjali kundalpady', 'pradeeptha r jain', 'rukmani r', 'seema', 'anwesha dey']\n",
"In pool 2, we have:\n",
" ['sourabh saini', 'naveen kumar d', 'debanjan karan', 'jyotirmoy barman', 'uddeepta deka', 'mohammad saif khan', 'akash sarkar', 'souvik jana', 'rahul metya', 'arnab paul', 'devadevan m m', 'shubhadeep chakraborty', 'tirthankar mondal', 'mukesh kumar singh', 'shivam kumar sharma', 'tuneer', 'omkar shetye', 'aditya kumar sharma', 'saikat santra', 'sam k mathew', 'sumukha s adiga', 'saumav kapoor', 'ankan man', 'ratul thakur', 'saptarshi mandal', 'shaibal karmakar', 'bhanu kiran s']\n",
"In pool 3, we have:\n",
" ['anikat kankaria', 'aiswarya n s', 'avi wadhwa', 'ankur barsode', 'tamoghna ray', 'akash maurya', 'kaustubh', 'viswanathan', 'bibek saha', 'harsh nigam', 'sunit banerjee', 'manish jain', 'sahil kumar singh', 'aditya thorat', 'sandip sahoo', 'umesh kumar', 'muhammed irshad p', 'priyangshu goswami', 'neha sharma', 'devanshi parashar', 'santhiya p s', 'bikram pain', 'ritwick kumar ghosh', 'ankush chaubey', 'ritesh harshe', 'priyadharshini v', 'shridhar vinayak', 'jigyasa watwani', 'kunal kumar', 'harshit joshi', 'sparsh gupta', 'ashik.h@icts.res.in', 'ritwik mukherjee', 'atharva naik', 'abhinav yadav', 'alorika kar', 'alan sherry', 'rishabh kaushik', 'swapan limbu', 'priyanka sinha', 'koustav narayan maity']\n"
]
}
],
"source": [
"housing_pools = {}\n",
"\n",
"for pool_id in get_possible_pools():\n",
" _pool = []\n",
" for person_name in inputs[\"name\"]:\n",
" # FIXME: Change the next line for postdocs\n",
" if get_info_for_person(person_name, \"student_or_postdoc\") == \"student\":\n",
" if get_pool_number_for_student(person_name) == pool_id:\n",
" _pool.append(person_name)\n",
" housing_pools[pool_id] = _pool\n",
"\n",
"print(\"Here are our assignments:\")\n",
"\n",
"for pool_id in housing_pools:\n",
" print(f\"In pool {pool_id}, we have:\\n {housing_pools[pool_id]}\")\n",
"\n",
"all_pools[\"student\"] = copy.deepcopy(housing_pools)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Here are our assignments:\n",
"In pool 1, we have:\n",
" []\n",
"In pool 2, we have:\n",
" []\n",
"In pool 3, we have:\n",
" []\n"
]
}
],
"source": [
"housing_pools = {}\n",
"\n",
"for pool_id in get_possible_pools():\n",
" _pool = []\n",
" for person_name in inputs[\"name\"]:\n",
" # FIXME: Change the next line for postdocs\n",
" if get_info_for_person(person_name, \"student_or_postdoc\") == \"postdoc\":\n",
" if get_pool_number_for_postdoc(person_name) == pool_id:\n",
" _pool.append(person_name)\n",
" housing_pools[pool_id] = _pool\n",
"\n",
"print(\"Here are our assignments:\")\n",
"\n",
"for pool_id in housing_pools:\n",
" print(f\"In pool {pool_id}, we have:\\n {housing_pools[pool_id]}\")\n",
"\n",
"all_pools[\"postdoc\"] = copy.deepcopy(housing_pools)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Draw lottery and assign housing"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"housing_allocations = {}"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"------------------------\n",
"Processing housing allotments for: student\n",
"\n",
"As per a randomized lottery, we will allocate pool 1 in the following order:['anjali kundalpady', 'rukmani r', 'babli khatun', 'anwesha dey', 'seema', 'pradeeptha r jain']\n",
"...assigning housing 0 to anjali kundalpady as it has 15 vacancies still.\n",
"...assigning housing 2 to rukmani r as it has 24 vacancies still.\n",
"...assigning housing 4 to babli khatun as it has 22 vacancies still.\n",
"...assigning housing 0 to anwesha dey as it has 14 vacancies still.\n",
"...assigning housing 0 to seema as it has 13 vacancies still.\n",
"...assigning housing 0 to pradeeptha r jain as it has 12 vacancies still.\n",
"\n",
"As per a randomized lottery, we will allocate pool 2 in the following order:['devadevan m m', 'sumukha s adiga', 'naveen kumar d', 'arnab paul', 'shubhadeep chakraborty', 'souvik jana', 'rahul metya', 'tirthankar mondal', 'debanjan karan', 'bhanu kiran s', 'shaibal karmakar', 'saikat santra', 'saumav kapoor', 'mohammad saif khan', 'tuneer', 'akash sarkar', 'shivam kumar sharma', 'ankan man', 'omkar shetye', 'aditya kumar sharma', 'uddeepta deka', 'saptarshi mandal', 'mukesh kumar singh', 'sam k mathew', 'sourabh saini', 'jyotirmoy barman', 'ratul thakur']\n",
"...assigning housing 0 to devadevan m m as it has 11 vacancies still.\n",
"...assigning housing 5 to sumukha s adiga as it has 42 vacancies still.\n",
"...assigning housing 2 to naveen kumar d as it has 23 vacancies still.\n",
"...assigning housing 5 to arnab paul as it has 41 vacancies still.\n",
"...assigning housing 5 to shubhadeep chakraborty as it has 40 vacancies still.\n",
"...assigning housing 0 to souvik jana as it has 10 vacancies still.\n",
"...assigning housing 0 to rahul metya as it has 9 vacancies still.\n",
"...assigning housing 5 to tirthankar mondal as it has 39 vacancies still.\n",
"...assigning housing 4 to debanjan karan as it has 21 vacancies still.\n",
"...assigning housing 2 to bhanu kiran s as it has 22 vacancies still.\n",
"...assigning housing 4 to shaibal karmakar as it has 20 vacancies still.\n",
"...assigning housing 2 to saikat santra as it has 21 vacancies still.\n",
"...assigning housing 0 to saumav kapoor as it has 8 vacancies still.\n",
"...assigning housing 0 to mohammad saif khan as it has 7 vacancies still.\n",
"...assigning housing 0 to tuneer as it has 6 vacancies still.\n",
"...assigning housing 0 to akash sarkar as it has 5 vacancies still.\n",
"...assigning housing 2 to shivam kumar sharma as it has 20 vacancies still.\n",
"...assigning housing 5 to ankan man as it has 38 vacancies still.\n",
"...assigning housing 5 to omkar shetye as it has 37 vacancies still.\n",
"...assigning housing 3 to aditya kumar sharma as it has 36 vacancies still.\n",
"...assigning housing 0 to uddeepta deka as it has 4 vacancies still.\n",
"...assigning housing 2 to saptarshi mandal as it has 19 vacancies still.\n",
"...assigning housing 0 to mukesh kumar singh as it has 3 vacancies still.\n",
"...assigning housing 5 to sam k mathew as it has 36 vacancies still.\n",
"...assigning housing 0 to sourabh saini as it has 2 vacancies still.\n",
"...assigning housing 5 to jyotirmoy barman as it has 35 vacancies still.\n",
"...assigning housing 4 to ratul thakur as it has 19 vacancies still.\n",
"\n",
"As per a randomized lottery, we will allocate pool 3 in the following order:['ashik.h@icts.res.in', 'jigyasa watwani', 'kunal kumar', 'priyadharshini v', 'ritwick kumar ghosh', 'aditya thorat', 'atharva naik', 'alan sherry', 'ritwik mukherjee', 'priyangshu goswami', 'sahil kumar singh', 'alorika kar', 'aiswarya n s', 'ankush chaubey', 'harshit joshi', 'swapan limbu', 'manish jain', 'neha sharma', 'abhinav yadav', 'harsh nigam', 'santhiya p s', 'devanshi parashar', 'akash maurya', 'sunit banerjee', 'ankur barsode', 'sandip sahoo', 'kaustubh', 'bibek saha', 'bikram pain', 'viswanathan', 'priyanka sinha', 'tamoghna ray', 'koustav narayan maity', 'sparsh gupta', 'rishabh kaushik', 'ritesh harshe', 'muhammed irshad p', 'anikat kankaria', 'avi wadhwa', 'shridhar vinayak', 'umesh kumar']\n",
"...assigning housing 3 to ashik.h@icts.res.in as it has 35 vacancies still.\n",
"...assigning housing 2 to jigyasa watwani as it has 18 vacancies still.\n",
"...assigning housing 3 to kunal kumar as it has 34 vacancies still.\n",
"...assigning housing 5 to priyadharshini v as it has 34 vacancies still.\n",
"...assigning housing 3 to ritwick kumar ghosh as it has 33 vacancies still.\n",
"...assigning housing 2 to aditya thorat as it has 17 vacancies still.\n",
"...assigning housing 2 to atharva naik as it has 16 vacancies still.\n",
"...assigning housing 4 to alan sherry as it has 18 vacancies still.\n",
"...assigning housing 2 to ritwik mukherjee as it has 15 vacancies still.\n",
"...assigning housing 0 to priyangshu goswami as it has 1 vacancies still.\n",
"...assigning housing 4 to sahil kumar singh as it has 17 vacancies still.\n",
"...assigning housing 2 to alorika kar as it has 14 vacancies still.\n",
"For aiswarya n s, acco 0 is full. Moving on...\n",
"...assigning housing 2 to aiswarya n s as it has 13 vacancies still.\n",
"...assigning housing 3 to ankush chaubey as it has 32 vacancies still.\n",
"...assigning housing 3 to harshit joshi as it has 31 vacancies still.\n",
"...assigning housing 3 to swapan limbu as it has 30 vacancies still.\n",
"For manish jain, acco 0 is full. Moving on...\n",
"For manish jain, acco 1 is full. Moving on...\n",
"...assigning housing 2 to manish jain as it has 12 vacancies still.\n",
"...assigning housing 2 to neha sharma as it has 11 vacancies still.\n",
"...assigning housing 3 to abhinav yadav as it has 29 vacancies still.\n",
"For harsh nigam, acco 0 is full. Moving on...\n",
"...assigning housing 3 to harsh nigam as it has 28 vacancies still.\n",
"...assigning housing 5 to santhiya p s as it has 33 vacancies still.\n",
"...assigning housing 2 to devanshi parashar as it has 10 vacancies still.\n",
"...assigning housing 4 to akash maurya as it has 16 vacancies still.\n",
"For sunit banerjee, acco 0 is full. Moving on...\n",
"...assigning housing 2 to sunit banerjee as it has 9 vacancies still.\n",
"For ankur barsode, acco 0 is full. Moving on...\n",
"For ankur barsode, acco 1 is full. Moving on...\n",
"...assigning housing 2 to ankur barsode as it has 8 vacancies still.\n",
"...assigning housing 3 to sandip sahoo as it has 27 vacancies still.\n",
"...assigning housing 2 to kaustubh as it has 7 vacancies still.\n",
"For bibek saha, acco 0 is full. Moving on...\n",
"For bibek saha, acco 1 is full. Moving on...\n",
"...assigning housing 2 to bibek saha as it has 6 vacancies still.\n",
"...assigning housing 2 to bikram pain as it has 5 vacancies still.\n",
"...assigning housing 2 to viswanathan as it has 4 vacancies still.\n",
"For priyanka sinha, acco 0 is full. Moving on...\n",
"...assigning housing 2 to priyanka sinha as it has 3 vacancies still.\n",
"...assigning housing 4 to tamoghna ray as it has 15 vacancies still.\n",
"For koustav narayan maity, acco 0 is full. Moving on...\n",
"...assigning housing 5 to koustav narayan maity as it has 32 vacancies still.\n",
"...assigning housing 4 to sparsh gupta as it has 14 vacancies still.\n",
"For rishabh kaushik, acco 0 is full. Moving on...\n",
"...assigning housing 2 to rishabh kaushik as it has 2 vacancies still.\n",
"For ritesh harshe, acco 0 is full. Moving on...\n",
"...assigning housing 5 to ritesh harshe as it has 31 vacancies still.\n",
"...assigning housing 2 to muhammed irshad p as it has 1 vacancies still.\n",
"For anikat kankaria, acco 0 is full. Moving on...\n",
"...assigning housing 3 to anikat kankaria as it has 26 vacancies still.\n",
"For avi wadhwa, acco 2 is full. Moving on...\n",
"For avi wadhwa, acco 1 is full. Moving on...\n",
"...assigning housing 5 to avi wadhwa as it has 30 vacancies still.\n",
"...assigning housing 3 to shridhar vinayak as it has 25 vacancies still.\n",
"...assigning housing 4 to umesh kumar as it has 13 vacancies still.\n",
"------------------------\n"
]
}
],
"source": [
"for pool_type in [\"student\"]:\n",
" print(\"------------------------\")\n",
" print(f\"Processing housing allotments for: {pool_type}\")\n",
" current_availability = copy.deepcopy(availability[pool_type])\n",
" current_pool = all_pools[pool_type]\n",
"\n",
" for pool_id in get_possible_pools():\n",
" # randomly assign ranks, and sort according to it\n",
" this_pool = current_pool[pool_id]\n",
" # print(this_pool)\n",
" random.shuffle(this_pool)\n",
" # print(this_pool)\n",
"\n",
" print(\n",
" f\"\\nAs per a randomized lottery, we will allocate pool {pool_id} in the following order:\"\n",
" f\"{this_pool}\"\n",
" )\n",
"\n",
" # now we go over the ranked list, and assign housing based on availability\n",
" for person_name in this_pool:\n",
" their_preferences = get_info_for_person(person_name, \"preferences\")\n",
" for pref in their_preferences:\n",
" if current_availability[pref] > 0:\n",
" # Allot NOW!\n",
" print(\n",
" f\"\"\"...assigning housing {pref} to {\n",
" person_name} as it has {\n",
" current_availability[pref]} vacancies still.\"\"\"\n",
" )\n",
" housing_allocations[person_name] = pref\n",
" current_availability[pref] = current_availability[pref] - 1\n",
" break\n",
" else:\n",
" print(f\"For {person_name}, acco {pref} is full. Moving on...\")\n",
" continue\n",
" print(\"------------------------\")"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"with open('2024__housing_allocations.txt', 'w') as fout:\n",
" fout.write(f\"# Name,Housing Allocationn\\n\")\n",
" for name in housing_allocations:\n",
" fout.write(f\"{name},{housing_allocations[name]}\\n\")"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"# Name,Housing Allocationn\n",
"anjali kundalpady,0\n",
"rukmani r,2\n",
"babli khatun,4\n",
"anwesha dey,0\n",
"seema,0\n",
"pradeeptha r jain,0\n",
"devadevan m m,0\n",
"sumukha s adiga,5\n",
"naveen kumar d,2\n",
"arnab paul,5\n",
"shubhadeep chakraborty,5\n",
"souvik jana,0\n",
"rahul metya,0\n",
"tirthankar mondal,5\n",
"debanjan karan,4\n",
"bhanu kiran s,2\n",
"shaibal karmakar,4\n",
"saikat santra,2\n",
"saumav kapoor,0\n",
"mohammad saif khan,0\n",
"tuneer,0\n",
"akash sarkar,0\n",
"shivam kumar sharma,2\n",
"ankan man,5\n",
"omkar shetye,5\n",
"aditya kumar sharma,3\n",
"uddeepta deka,0\n",
"saptarshi mandal,2\n",
"mukesh kumar singh,0\n",
"sam k mathew,5\n",
"sourabh saini,0\n",
"jyotirmoy barman,5\n",
"ratul thakur,4\n",
"ashik.h@icts.res.in,3\n",
"jigyasa watwani,2\n",
"kunal kumar,3\n",
"priyadharshini v,5\n",
"ritwick kumar ghosh,3\n",
"aditya thorat,2\n",
"atharva naik,2\n",
"alan sherry,4\n",
"ritwik mukherjee,2\n",
"priyangshu goswami,0\n",
"sahil kumar singh,4\n",
"alorika kar,2\n",
"aiswarya n s,2\n",
"ankush chaubey,3\n",
"harshit joshi,3\n",
"swapan limbu,3\n",
"manish jain,2\n",
"neha sharma,2\n",
"abhinav yadav,3\n",
"harsh nigam,3\n",
"santhiya p s,5\n",
"devanshi parashar,2\n",
"akash maurya,4\n",
"sunit banerjee,2\n",
"ankur barsode,2\n",
"sandip sahoo,3\n",
"kaustubh,2\n",
"bibek saha,2\n",
"bikram pain,2\n",
"viswanathan,2\n",
"priyanka sinha,2\n",
"tamoghna ray,4\n",
"koustav narayan maity,5\n",
"sparsh gupta,4\n",
"rishabh kaushik,2\n",
"ritesh harshe,5\n",
"muhammed irshad p,2\n",
"anikat kankaria,3\n",
"avi wadhwa,5\n",
"shridhar vinayak,3\n",
"umesh kumar,4\n"
]
}
],
"source": [
"!cat 2024__housing_allocations.txt"
]
},
{
"cell_type": "code",
"execution_count": 25,
"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># Name</th>\n",
" <th>Housing Allocationn</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>anjali kundalpady</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>rukmani r</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>babli khatun</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>anwesha dey</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>seema</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>pradeeptha r jain</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>devadevan m m</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>sumukha s adiga</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>naveen kumar d</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>arnab paul</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>shubhadeep chakraborty</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>souvik jana</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>rahul metya</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>tirthankar mondal</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>debanjan karan</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>bhanu kiran s</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>shaibal karmakar</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>saikat santra</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>saumav kapoor</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>mohammad saif khan</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>tuneer</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>akash sarkar</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>shivam kumar sharma</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>ankan man</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>omkar shetye</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>aditya kumar sharma</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>uddeepta deka</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>saptarshi mandal</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>mukesh kumar singh</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>sam k mathew</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30</th>\n",
" <td>sourabh saini</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31</th>\n",
" <td>jyotirmoy barman</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32</th>\n",
" <td>ratul thakur</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>33</th>\n",
" <td>ashik.h@icts.res.in</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34</th>\n",
" <td>jigyasa watwani</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>35</th>\n",
" <td>kunal kumar</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>36</th>\n",
" <td>priyadharshini v</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>37</th>\n",
" <td>ritwick kumar ghosh</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>38</th>\n",
" <td>aditya thorat</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>39</th>\n",
" <td>atharva naik</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>40</th>\n",
" <td>alan sherry</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>41</th>\n",
" <td>ritwik mukherjee</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>42</th>\n",
" <td>priyangshu goswami</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>43</th>\n",
" <td>sahil kumar singh</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>44</th>\n",
" <td>alorika kar</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>45</th>\n",
" <td>aiswarya n s</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>46</th>\n",
" <td>ankush chaubey</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>47</th>\n",
" <td>harshit joshi</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>48</th>\n",
" <td>swapan limbu</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>49</th>\n",
" <td>manish jain</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50</th>\n",
" <td>neha sharma</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>51</th>\n",
" <td>abhinav yadav</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>52</th>\n",
" <td>harsh nigam</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>53</th>\n",
" <td>santhiya p s</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>54</th>\n",
" <td>devanshi parashar</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>55</th>\n",
" <td>akash maurya</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>56</th>\n",
" <td>sunit banerjee</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>57</th>\n",
" <td>ankur barsode</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>58</th>\n",
" <td>sandip sahoo</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>59</th>\n",
" <td>kaustubh</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>60</th>\n",
" <td>bibek saha</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>61</th>\n",
" <td>bikram pain</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>62</th>\n",
" <td>viswanathan</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>63</th>\n",
" <td>priyanka sinha</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>64</th>\n",
" <td>tamoghna ray</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>65</th>\n",
" <td>koustav narayan maity</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>66</th>\n",
" <td>sparsh gupta</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>67</th>\n",
" <td>rishabh kaushik</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>68</th>\n",
" <td>ritesh harshe</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>69</th>\n",
" <td>muhammed irshad p</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>70</th>\n",
" <td>anikat kankaria</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>71</th>\n",
" <td>avi wadhwa</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>72</th>\n",
" <td>shridhar vinayak</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>73</th>\n",
" <td>umesh kumar</td>\n",
" <td>4</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" # Name Housing Allocationn\n",
"0 anjali kundalpady 0\n",
"1 rukmani r 2\n",
"2 babli khatun 4\n",
"3 anwesha dey 0\n",
"4 seema 0\n",
"5 pradeeptha r jain 0\n",
"6 devadevan m m 0\n",
"7 sumukha s adiga 5\n",
"8 naveen kumar d 2\n",
"9 arnab paul 5\n",
"10 shubhadeep chakraborty 5\n",
"11 souvik jana 0\n",
"12 rahul metya 0\n",
"13 tirthankar mondal 5\n",
"14 debanjan karan 4\n",
"15 bhanu kiran s 2\n",
"16 shaibal karmakar 4\n",
"17 saikat santra 2\n",
"18 saumav kapoor 0\n",
"19 mohammad saif khan 0\n",
"20 tuneer 0\n",
"21 akash sarkar 0\n",
"22 shivam kumar sharma 2\n",
"23 ankan man 5\n",
"24 omkar shetye 5\n",
"25 aditya kumar sharma 3\n",
"26 uddeepta deka 0\n",
"27 saptarshi mandal 2\n",
"28 mukesh kumar singh 0\n",
"29 sam k mathew 5\n",
"30 sourabh saini 0\n",
"31 jyotirmoy barman 5\n",
"32 ratul thakur 4\n",
"33 ashik.h@icts.res.in 3\n",
"34 jigyasa watwani 2\n",
"35 kunal kumar 3\n",
"36 priyadharshini v 5\n",
"37 ritwick kumar ghosh 3\n",
"38 aditya thorat 2\n",
"39 atharva naik 2\n",
"40 alan sherry 4\n",
"41 ritwik mukherjee 2\n",
"42 priyangshu goswami 0\n",
"43 sahil kumar singh 4\n",
"44 alorika kar 2\n",
"45 aiswarya n s 2\n",
"46 ankush chaubey 3\n",
"47 harshit joshi 3\n",
"48 swapan limbu 3\n",
"49 manish jain 2\n",
"50 neha sharma 2\n",
"51 abhinav yadav 3\n",
"52 harsh nigam 3\n",
"53 santhiya p s 5\n",
"54 devanshi parashar 2\n",
"55 akash maurya 4\n",
"56 sunit banerjee 2\n",
"57 ankur barsode 2\n",
"58 sandip sahoo 3\n",
"59 kaustubh 2\n",
"60 bibek saha 2\n",
"61 bikram pain 2\n",
"62 viswanathan 2\n",
"63 priyanka sinha 2\n",
"64 tamoghna ray 4\n",
"65 koustav narayan maity 5\n",
"66 sparsh gupta 4\n",
"67 rishabh kaushik 2\n",
"68 ritesh harshe 5\n",
"69 muhammed irshad p 2\n",
"70 anikat kankaria 3\n",
"71 avi wadhwa 5\n",
"72 shridhar vinayak 3\n",
"73 umesh kumar 4"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pd.set_option('display.max_rows', None)\n",
"pd.read_csv(\"2024__housing_allocations.txt\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"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.8.16"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment