{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Лабораторная 5\n", "\n", "Датасет: Информация об онлайн обучении учеников\n", "\n", "## Бизнес-цель\n", "Улучшение доступа к онлайн-образованию для учеников с низким уровнем финансового обеспечения." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Index(['Education Level', 'Institution Type', 'Gender', 'Age', 'Device',\n", " 'IT Student', 'Location', 'Financial Condition', 'Internet Type',\n", " 'Network Type', 'Flexibility Level'],\n", " dtype='object')\n" ] } ], "source": [ "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "\n", "df = pd.read_csv(\"..\\\\static\\\\csv\\\\students_adaptability_level_online_education.csv\")\n", "print(df.columns)\n", "\n", "map_flexibility_to_int = {'Low': 0, 'Moderate': 1, 'High': 2}\n", "\n", "df['Flexibility Level'] = df['Flexibility Level'].map(map_flexibility_to_int).astype('int32')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Конвеер из 4 лабораторной" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Age | \n", "Flexibility Level | \n", "Education Level_School | \n", "Education Level_University | \n", "Institution Type_Public | \n", "Gender_Male | \n", "Device_Mobile | \n", "Device_Tab | \n", "IT Student_Yes | \n", "Location_Town | \n", "Financial Condition_Poor | \n", "Financial Condition_Rich | \n", "Internet Type_Wifi | \n", "Network Type_3G | \n", "Network Type_4G | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "1.018272 | \n", "0.510309 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "1.0 | \n", "
1 | \n", "1.018272 | \n", "0.510309 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "
2 | \n", "0.160338 | \n", "0.510309 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "1.0 | \n", "
3 | \n", "-1.040771 | \n", "0.510309 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "
4 | \n", "0.160338 | \n", "-1.107907 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
1200 | \n", "0.160338 | \n", "-1.107907 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "1.0 | \n", "
1201 | \n", "0.160338 | \n", "0.510309 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "1.0 | \n", "
1202 | \n", "-1.040771 | \n", "0.510309 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "
1203 | \n", "0.160338 | \n", "-1.107907 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "1.0 | \n", "
1204 | \n", "-1.040771 | \n", "0.510309 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "1.0 | \n", "0.0 | \n", "0.0 | \n", "1.0 | \n", "0.0 | \n", "
1205 rows × 15 columns
\n", "