{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "3745035b", "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>MaMH</th>\n", " <th>TenMH</th>\n", " <th>NhomTo</th>\n", " <th>ToTH</th>\n", " <th>TenLop</th>\n", " <th>TongSoSV</th>\n", " <th>ThuKieuSo</th>\n", " <th>TietBD</th>\n", " <th>SoTiet</th>\n", " <th>MaPH</th>\n", " <th>DSTuanHoc</th>\n", " <th>MaNV</th>\n", " <th>TenDayDuNV</th>\n", " <th>IsTKBDaXep</th>\n", " <th>MaDV</th>\n", " <th>TenDV</th>\n", " <th>TenDVEg</th>\n", " <th>NgayBD</th>\n", " <th>NgayKT</th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>0</th>\n", " <td>1</td>\n", " <td>Functional Programming</td>\n", " <td>1</td>\n", " <td>NaN</td>\n", " <td>ITIT16UN11, ITIT16UN21</td>\n", " <td>10</td>\n", " <td>2</td>\n", " <td>1</td>\n", " <td>3</td>\n", " <td>LA1.605</td>\n", " <td>-2345678901234567---</td>\n", " <td>174</td>\n", " <td>Dao Tran Hoang Chau</td>\n", " <td>0</td>\n", " <td>IT IT</td>\n", " <td>Computer Science & Engineering</td>\n", " <td>Computer Science & Engineering</td>\n", " <td>42989</td>\n", " <td>43094</td>\n", " </tr>\n", " <tr>\n", " <th>1</th>\n", " <td>2</td>\n", " <td>Operating Systems</td>\n", " <td>1</td>\n", " <td>NaN</td>\n", " <td>ITIT15CS1, ITIT15IU11, ITIT15IU21, ITIT15IU31</td>\n", " <td>90</td>\n", " <td>6</td>\n", " <td>6</td>\n", " <td>3</td>\n", " <td>A1.309</td>\n", " <td>-2345678901234567---</td>\n", " <td>119</td>\n", " <td>Tran Manh Ha</td>\n", " <td>0</td>\n", " <td>IT IT</td>\n", " <td>Computer Science & Engineering</td>\n", " <td>Computer Science & Engineering</td>\n", " <td>42993</td>\n", " <td>43098</td>\n", " </tr>\n", " <tr>\n", " <th>2</th>\n", " <td>2</td>\n", " <td>Operating Systems</td>\n", " <td>1</td>\n", " <td>1.0</td>\n", " <td>ITIT15CS1, ITIT15IU11, ITIT15IU21, ITIT15IU31</td>\n", " <td>30</td>\n", " <td>2</td>\n", " <td>6</td>\n", " <td>4</td>\n", " <td>LA1.605</td>\n", " <td>-----678901234------</td>\n", " <td>119</td>\n", " <td>Tran Manh Ha</td>\n", " <td>0</td>\n", " <td>IT IT</td>\n", " <td>Computer Science & Engineering</td>\n", " <td>Computer Science & Engineering</td>\n", " <td>43017</td>\n", " <td>43073</td>\n", " </tr>\n", " <tr>\n", " <th>3</th>\n", " <td>2</td>\n", " <td>Operating Systems</td>\n", " <td>1</td>\n", " <td>2.0</td>\n", " <td>ITIT15CS1, ITIT15IU11, ITIT15IU21, ITIT15IU31</td>\n", " <td>30</td>\n", " <td>2</td>\n", " <td>1</td>\n", " <td>4</td>\n", " <td>LA1.608</td>\n", " <td>-----678901234------</td>\n", " <td>213</td>\n", " <td>Nguyen Tien Dung</td>\n", " <td>0</td>\n", " <td>IT IT</td>\n", " <td>Computer Science & Engineering</td>\n", " <td>Computer Science & Engineering</td>\n", " <td>43017</td>\n", " <td>43073</td>\n", " </tr>\n", " <tr>\n", " <th>4</th>\n", " <td>2</td>\n", " <td>Operating Systems</td>\n", " <td>1</td>\n", " <td>3.0</td>\n", " <td>ITIT15CS1, ITIT15IU11, ITIT15IU21, ITIT15IU31</td>\n", " <td>30</td>\n", " <td>2</td>\n", " <td>6</td>\n", " <td>4</td>\n", " <td>LA1.607</td>\n", " <td>-----678901234------</td>\n", " <td>213</td>\n", " <td>Nguyen Tien Dung</td>\n", " <td>0</td>\n", " <td>IT IT</td>\n", " <td>Computer Science & Engineering</td>\n", " <td>Computer Science & Engineering</td>\n", " <td>43017</td>\n", " <td>43073</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " MaMH TenMH NhomTo ToTH \\\n", "0 1 Functional Programming 1 NaN \n", "1 2 Operating Systems 1 NaN \n", "2 2 Operating Systems 1 1.0 \n", "3 2 Operating Systems 1 2.0 \n", "4 2 Operating Systems 1 3.0 \n", "\n", " TenLop TongSoSV ThuKieuSo TietBD \\\n", "0 ITIT16UN11, ITIT16UN21 10 2 1 \n", "1 ITIT15CS1, ITIT15IU11, ITIT15IU21, ITIT15IU31 90 6 6 \n", "2 ITIT15CS1, ITIT15IU11, ITIT15IU21, ITIT15IU31 30 2 6 \n", "3 ITIT15CS1, ITIT15IU11, ITIT15IU21, ITIT15IU31 30 2 1 \n", "4 ITIT15CS1, ITIT15IU11, ITIT15IU21, ITIT15IU31 30 2 6 \n", "\n", " SoTiet MaPH DSTuanHoc MaNV TenDayDuNV \\\n", "0 3 LA1.605 -2345678901234567--- 174 Dao Tran Hoang Chau \n", "1 3 A1.309 -2345678901234567--- 119 Tran Manh Ha \n", "2 4 LA1.605 -----678901234------ 119 Tran Manh Ha \n", "3 4 LA1.608 -----678901234------ 213 Nguyen Tien Dung \n", "4 4 LA1.607 -----678901234------ 213 Nguyen Tien Dung \n", "\n", " IsTKBDaXep MaDV TenDV \\\n", "0 0 IT IT Computer Science & Engineering \n", "1 0 IT IT Computer Science & Engineering \n", "2 0 IT IT Computer Science & Engineering \n", "3 0 IT IT Computer Science & Engineering \n", "4 0 IT IT Computer Science & Engineering \n", "\n", " TenDVEg NgayBD NgayKT \n", "0 Computer Science & Engineering 42989 43094 \n", "1 Computer Science & Engineering 42993 43098 \n", "2 Computer Science & Engineering 43017 43073 \n", "3 Computer Science & Engineering 43017 43073 \n", "4 Computer Science & Engineering 43017 43073 " ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "import numpy as np\n", "df = pd.read_csv(\"TKB HKI 2017-2018.csv\")\n", "df.head()" ] }, { "cell_type": "code", "execution_count": 2, "id": "a605911f", "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>group_id</th>\n", " <th>course_id</th>\n", " <th>course_name</th>\n", " <th>Lab</th>\n", " <th>size</th>\n", " <th>duration</th>\n", " <th>room</th>\n", " <th>prof_id</th>\n", " <th>prof_name</th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>0</th>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>Functional Programming</td>\n", " <td>False</td>\n", " <td>10</td>\n", " <td>3</td>\n", " <td>LA1.605</td>\n", " <td>174</td>\n", " <td>Dao Tran Hoang Chau</td>\n", " </tr>\n", " <tr>\n", " <th>1</th>\n", " <td>2</td>\n", " <td>2</td>\n", " <td>Operating Systems</td>\n", " <td>False</td>\n", " <td>90</td>\n", " <td>3</td>\n", " <td>A1.309</td>\n", " <td>119</td>\n", " <td>Tran Manh Ha</td>\n", " </tr>\n", " <tr>\n", " <th>2</th>\n", " <td>3</td>\n", " <td>2</td>\n", " <td>Operating Systems</td>\n", " <td>True</td>\n", " <td>30</td>\n", " <td>4</td>\n", " <td>LA1.605</td>\n", " <td>119</td>\n", " <td>Tran Manh Ha</td>\n", " </tr>\n", " <tr>\n", " <th>3</th>\n", " <td>4</td>\n", " <td>2</td>\n", " <td>Operating Systems</td>\n", " <td>True</td>\n", " <td>30</td>\n", " <td>4</td>\n", " <td>LA1.608</td>\n", " <td>213</td>\n", " <td>Nguyen Tien Dung</td>\n", " </tr>\n", " <tr>\n", " <th>4</th>\n", " <td>5</td>\n", " <td>2</td>\n", " <td>Operating Systems</td>\n", " <td>True</td>\n", " <td>30</td>\n", " <td>4</td>\n", " <td>LA1.607</td>\n", " <td>213</td>\n", " <td>Nguyen Tien Dung</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " group_id course_id course_name Lab size duration \\\n", "0 1 1 Functional Programming False 10 3 \n", "1 2 2 Operating Systems False 90 3 \n", "2 3 2 Operating Systems True 30 4 \n", "3 4 2 Operating Systems True 30 4 \n", "4 5 2 Operating Systems True 30 4 \n", "\n", " room prof_id prof_name \n", "0 LA1.605 174 Dao Tran Hoang Chau \n", "1 A1.309 119 Tran Manh Ha \n", "2 LA1.605 119 Tran Manh Ha \n", "3 LA1.608 213 Nguyen Tien Dung \n", "4 LA1.607 213 Nguyen Tien Dung " ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = pd.DataFrame(df)\n", "df1 = df[['MaMH', 'TenMH', 'ToTH', 'TongSoSV', 'SoTiet', 'MaPH','MaNV', 'TenDayDuNV']]\n", "df1 = df1.rename(columns={'MaMH': 'course_id', 'TenMH': 'course_name','ToTH': 'Lab', 'TongSoSV': 'size', 'SoTiet': 'duration', 'MaPH': 'room', 'MaNV': 'prof_id', 'TenDayDuNV': 'prof_name' })\n", "df1['Lab'] = df1['Lab'].fillna(0)\n", "df1['Lab'] = df1['Lab'].astype(str)\n", "df1['prof_id'] = df1['prof_id'].astype(int)\n", "df1['course_id'] = df1['course_id'].astype(int)\n", "\n", "for index, row in df1.iterrows():\n", " if row['Lab'] == '1.0' or row['Lab'] == '2.0' or row['Lab'] == '3.0' or row['Lab'] == '4.0':\n", " df1.at[index, 'Lab'] = 'True'\n", " else:\n", " df1.at[index, 'Lab'] = ''\n", " \n", "df1['Lab'] = df1['Lab'].astype(bool)\n", "df1.reset_index(inplace=True)\n", "df1 = df1.rename(columns={'index': 'group_id'})\n", "df1['group_id'] = np.arange(1, len(df) + 1)\n", "df1.head()" ] }, { "cell_type": "code", "execution_count": 3, "id": "80f6ef63", "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>room</th>\n", " <th>size</th>\n", " <th>Lab</th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>0</th>\n", " <td>A1.309</td>\n", " <td>90</td>\n", " <td>False</td>\n", " </tr>\n", " <tr>\n", " <th>1</th>\n", " <td>L107</td>\n", " <td>40</td>\n", " <td>False</td>\n", " </tr>\n", " <tr>\n", " <th>2</th>\n", " <td>LA1.605</td>\n", " <td>35</td>\n", " <td>True</td>\n", " </tr>\n", " <tr>\n", " <th>3</th>\n", " <td>LA1.607</td>\n", " <td>35</td>\n", " <td>True</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " room size Lab\n", "0 A1.309 90 False\n", "1 L107 40 False\n", "2 LA1.605 35 True\n", "3 LA1.607 35 True" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "room_default = [['A1.309', 90, 0],\n", " ['L107', 40, 0],\n", " ['LA1.605', 35, 1],\n", " ['LA1.607', 35, 1],\n", "]\n", "room_columns = ['room', 'size', 'Lab']\n", "df_room = pd.DataFrame(room_default, columns=room_columns)\n", "df_room['Lab'] = df_room['Lab'].astype(str)\n", "for index, row in df_room.iterrows():\n", " if row['Lab'] == '1':\n", " df_room.at[index, 'Lab'] = 'True'\n", " else:\n", " df_room.at[index, 'Lab'] = ''\n", "df_room['Lab'] = df_room['Lab'].astype(bool)\n", "df_room" ] }, { "cell_type": "code", "execution_count": 4, "id": "d6b5b6a2", "metadata": {}, "outputs": [], "source": [ "import json\n", "\n", "# create list of dictionaries representing each object in the JSON file\n", "objects = []\n", "\n", "for index, row in df1.iterrows():\n", " if row['prof_id'] != '':\n", " # create professor object\n", " prof = {\n", " \"prof\": {\n", " \"id\": row['prof_id'],\n", " \"name\": row['prof_name']\n", " }\n", " }\n", " if prof not in objects:\n", " objects.append(prof)\n", "\n", " if row['course_id'] != '':\n", " # create course object\n", " course = {\n", " \"course\": {\n", " \"id\": row['course_id'],\n", " \"name\": row['course_name']\n", " }\n", " }\n", " if course not in objects:\n", " objects.append(course)\n", "\n", " if row['group_id'] != '':\n", " # create room object\n", " group = {\n", " \"group\": {\n", " \"id\": row['group_id'],\n", " \"size\": row['size']\n", " }\n", " }\n", " if group not in objects:\n", " objects.append(group)\n", " \n", " if row['prof_id'] != '' and row['course_id'] != '':\n", " # create class object\n", " class_ = {\n", " \"class\": {\n", " \"professor\": row['prof_id'],\n", " \"course\": row['course_id'],\n", " \"duration\": row['duration'],\n", " \"group\": row['group_id'],\n", " \"lab\": row['Lab']\n", " }\n", " }\n", " if class_ not in objects:\n", " objects.append(class_)\n", " \n", "for index, row in df_room.iterrows():\n", " if row['room'] != '':\n", " # create room object\n", " room = {\n", " \"room\": {\n", " \"name\": row['room'],\n", " \"lab\": row['Lab'],\n", " \"size\": row['size']\n", " }\n", " }\n", " objects.append(room) \n", " \n", "# create JSON object with list of objects\n", "json_data = json.dumps(objects, sort_keys=False)\n", "\n", "# write JSON object to file\n", "with open('GaSchedule3.json', 'w') as f:\n", " f.write(json_data)" ] }, { "cell_type": "code", "execution_count": 5, "id": "f7a33b15", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'[{\"prof\": {\"id\": 174, \"name\": \"Dao Tran Hoang Chau\"}}, {\"course\": {\"id\": 1, \"name\": \"Functional Programming\"}}, {\"group\": {\"id\": 1, \"size\": 10}}, {\"class\": {\"professor\": 174, \"course\": 1, \"duration\": 3, \"group\": 1, \"lab\": false}}, {\"prof\": {\"id\": 119, \"name\": \"Tran Manh Ha\"}}, {\"course\": {\"id\": 2, \"name\": \"Operating Systems\"}}, {\"group\": {\"id\": 2, \"size\": 90}}, {\"class\": {\"professor\": 119, \"course\": 2, \"duration\": 3, \"group\": 2, \"lab\": false}}, {\"group\": {\"id\": 3, \"size\": 30}}, {\"class\": {\"professor\": 119, \"course\": 2, \"duration\": 4, \"group\": 3, \"lab\": true}}, {\"prof\": {\"id\": 213, \"name\": \"Nguyen Tien Dung\"}}, {\"group\": {\"id\": 4, \"size\": 30}}, {\"class\": {\"professor\": 213, \"course\": 2, \"duration\": 4, \"group\": 4, \"lab\": true}}, {\"group\": {\"id\": 5, \"size\": 30}}, {\"class\": {\"professor\": 213, \"course\": 2, \"duration\": 4, \"group\": 5, \"lab\": true}}, {\"prof\": {\"id\": 74, \"name\": \"Nguyen Van Sinh\"}}, {\"course\": {\"id\": 3, \"name\": \"IT Project Management\"}}, {\"group\": {\"id\": 6, \"size\": 35}}, {\"class\": {\"professor\": 74, \"course\": 3, \"duration\": 3, \"group\": 6, \"lab\": false}}, {\"group\": {\"id\": 7, \"size\": 35}}, {\"class\": {\"professor\": 74, \"course\": 3, \"duration\": 4, \"group\": 7, \"lab\": true}}, {\"prof\": {\"id\": 84, \"name\": \"Le Hai Duong\"}}, {\"course\": {\"id\": 4, \"name\": \"Introduction to Computing\"}}, {\"group\": {\"id\": 8, \"size\": 35}}, {\"class\": {\"professor\": 84, \"course\": 4, \"duration\": 3, \"group\": 8, \"lab\": false}}, {\"prof\": {\"id\": 19, \"name\": \"Huynh Kha Tu\"}}, {\"course\": {\"id\": 5, \"name\": \"Digital Logic Design\"}}, {\"group\": {\"id\": 9, \"size\": 90}}, {\"class\": {\"professor\": 19, \"course\": 5, \"duration\": 3, \"group\": 9, \"lab\": false}}, {\"prof\": {\"id\": 182, \"name\": \"Tran Thanh Tung\"}}, {\"course\": {\"id\": 6, \"name\": \"Object-Oriented Programming\"}}, {\"group\": {\"id\": 10, \"size\": 90}}, {\"class\": {\"professor\": 182, \"course\": 6, \"duration\": 3, \"group\": 10, \"lab\": false}}, {\"group\": {\"id\": 11, \"size\": 30}}, {\"class\": {\"professor\": 213, \"course\": 6, \"duration\": 4, \"group\": 11, \"lab\": true}}, {\"group\": {\"id\": 12, \"size\": 30}}, {\"class\": {\"professor\": 213, \"course\": 6, \"duration\": 4, \"group\": 12, \"lab\": true}}, {\"group\": {\"id\": 13, \"size\": 30}}, {\"class\": {\"professor\": 213, \"course\": 6, \"duration\": 4, \"group\": 13, \"lab\": true}}, {\"prof\": {\"id\": 349, \"name\": \"Nguyen Thi Thanh Sang\"}}, {\"course\": {\"id\": 7, \"name\": \"Software Engineering\"}}, {\"group\": {\"id\": 14, \"size\": 70}}, {\"class\": {\"professor\": 349, \"course\": 7, \"duration\": 3, \"group\": 14, \"lab\": false}}, {\"group\": {\"id\": 15, \"size\": 35}}, {\"class\": {\"professor\": 349, \"course\": 7, \"duration\": 4, \"group\": 15, \"lab\": true}}, {\"group\": {\"id\": 16, \"size\": 35}}, {\"class\": {\"professor\": 349, \"course\": 7, \"duration\": 4, \"group\": 16, \"lab\": true}}, {\"prof\": {\"id\": 62, \"name\": \"Vo Thi Luu Phuong\"}}, {\"course\": {\"id\": 8, \"name\": \"Computer Networks\"}}, {\"group\": {\"id\": 17, \"size\": 70}}, {\"class\": {\"professor\": 62, \"course\": 8, \"duration\": 3, \"group\": 17, \"lab\": false}}, {\"group\": {\"id\": 18, \"size\": 35}}, {\"class\": {\"professor\": 62, \"course\": 8, \"duration\": 4, \"group\": 18, \"lab\": true}}, {\"group\": {\"id\": 19, \"size\": 35}}, {\"class\": {\"professor\": 62, \"course\": 8, \"duration\": 4, \"group\": 19, \"lab\": true}}, {\"prof\": {\"id\": 60, \"name\": \"Ly Tu Nga\"}}, {\"group\": {\"id\": 20, \"size\": 20}}, {\"class\": {\"professor\": 60, \"course\": 8, \"duration\": 4, \"group\": 20, \"lab\": true}}, {\"course\": {\"id\": 9, \"name\": \"Web Application Development\"}}, {\"group\": {\"id\": 21, \"size\": 15}}, {\"class\": {\"professor\": 74, \"course\": 9, \"duration\": 3, \"group\": 21, \"lab\": false}}, {\"group\": {\"id\": 22, \"size\": 15}}, {\"class\": {\"professor\": 74, \"course\": 9, \"duration\": 4, \"group\": 22, \"lab\": true}}, {\"group\": {\"id\": 23, \"size\": 20}}, {\"class\": {\"professor\": 213, \"course\": 9, \"duration\": 4, \"group\": 23, \"lab\": true}}, {\"prof\": {\"id\": 36, \"name\": \"Le Thanh Son\"}}, {\"course\": {\"id\": 10, \"name\": \"Net-Centric Programming\"}}, {\"group\": {\"id\": 24, \"size\": 17}}, {\"class\": {\"professor\": 36, \"course\": 10, \"duration\": 3, \"group\": 24, \"lab\": false}}, {\"group\": {\"id\": 25, \"size\": 17}}, {\"class\": {\"professor\": 36, \"course\": 10, \"duration\": 4, \"group\": 25, \"lab\": true}}, {\"course\": {\"id\": 11, \"name\": \"Digital Logic Design Laboratory\"}}, {\"group\": {\"id\": 26, \"size\": 15}}, {\"class\": {\"professor\": 60, \"course\": 11, \"duration\": 4, \"group\": 26, \"lab\": false}}, {\"group\": {\"id\": 27, \"size\": 15}}, {\"class\": {\"professor\": 60, \"course\": 11, \"duration\": 4, \"group\": 27, \"lab\": false}}, {\"group\": {\"id\": 28, \"size\": 15}}, {\"class\": {\"professor\": 60, \"course\": 11, \"duration\": 4, \"group\": 28, \"lab\": false}}, {\"group\": {\"id\": 29, \"size\": 15}}, {\"class\": {\"professor\": 60, \"course\": 11, \"duration\": 4, \"group\": 29, \"lab\": false}}, {\"group\": {\"id\": 30, \"size\": 15}}, {\"class\": {\"professor\": 60, \"course\": 11, \"duration\": 4, \"group\": 30, \"lab\": false}}, {\"course\": {\"id\": 12, \"name\": \"Entrepreneurship\"}}, {\"group\": {\"id\": 31, \"size\": 80}}, {\"class\": {\"professor\": 174, \"course\": 12, \"duration\": 3, \"group\": 31, \"lab\": false}}, {\"course\": {\"id\": 13, \"name\": \"System & Network Administration\"}}, {\"group\": {\"id\": 32, \"size\": 35}}, {\"class\": {\"professor\": 36, \"course\": 13, \"duration\": 3, \"group\": 32, \"lab\": false}}, {\"group\": {\"id\": 33, \"size\": 35}}, {\"class\": {\"professor\": 36, \"course\": 13, \"duration\": 4, \"group\": 33, \"lab\": true}}, {\"prof\": {\"id\": 184, \"name\": \"Ha Viet Uyen Synh\"}}, {\"course\": {\"id\": 14, \"name\": \"Theoretical Models in Computing\"}}, {\"group\": {\"id\": 34, \"size\": 80}}, {\"class\": {\"professor\": 184, \"course\": 14, \"duration\": 3, \"group\": 34, \"lab\": false}}, {\"group\": {\"id\": 35, \"size\": 26}}, {\"class\": {\"professor\": 184, \"course\": 14, \"duration\": 4, \"group\": 35, \"lab\": true}}, {\"group\": {\"id\": 36, \"size\": 28}}, {\"class\": {\"professor\": 184, \"course\": 14, \"duration\": 4, \"group\": 36, \"lab\": true}}, {\"course\": {\"id\": 15, \"name\": \"Discrete Mathematics\"}}, {\"group\": {\"id\": 37, \"size\": 80}}, {\"class\": {\"professor\": 74, \"course\": 15, \"duration\": 3, \"group\": 37, \"lab\": false}}, {\"room\": {\"name\": \"A1.309\", \"lab\": false, \"size\": 90}}, {\"room\": {\"name\": \"L107\", \"lab\": false, \"size\": 40}}, {\"room\": {\"name\": \"LA1.605\", \"lab\": true, \"size\": 35}}, {\"room\": {\"name\": \"LA1.607\", \"lab\": true, \"size\": 35}}]'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "json_data" ] }, { "cell_type": "code", "execution_count": null, "id": "ac354530", "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.9.7" }, "vscode": { "interpreter": { "hash": "9510137371fb582fb03f4a48cfea1312dabd94192ffed7cc50b24473a7d892dd" } } }, "nbformat": 4, "nbformat_minor": 5 }