{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import os\n", "import pandas as pd\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "os.chdir(\"D:\\ml_project\")" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
genderrace_ethnicityparental_level_of_educationlunchtest_preparation_coursemath_scorereading_scorewriting_score
0femalegroup Bbachelor's degreestandardnone727274
1femalegroup Csome collegestandardcompleted699088
2femalegroup Bmaster's degreestandardnone909593
3malegroup Aassociate's degreefree/reducednone475744
4malegroup Csome collegestandardnone767875
\n", "
" ], "text/plain": [ " gender race_ethnicity parental_level_of_education lunch \\\n", "0 female group B bachelor's degree standard \n", "1 female group C some college standard \n", "2 female group B master's degree standard \n", "3 male group A associate's degree free/reduced \n", "4 male group C some college standard \n", "\n", " test_preparation_course math_score reading_score writing_score \n", "0 none 72 72 74 \n", "1 completed 69 90 88 \n", "2 none 90 95 93 \n", "3 none 47 57 44 \n", "4 none 76 78 75 " ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = pd.read_csv(\"data.csv\")\n", "df.head()" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
math_scorereading_scorewriting_score
count1000.000001000.0000001000.000000
mean66.0890069.16900068.054000
std15.1630814.60019215.195657
min0.0000017.00000010.000000
25%57.0000059.00000057.750000
50%66.0000070.00000069.000000
75%77.0000079.00000079.000000
max100.00000100.000000100.000000
\n", "
" ], "text/plain": [ " math_score reading_score writing_score\n", "count 1000.00000 1000.000000 1000.000000\n", "mean 66.08900 69.169000 68.054000\n", "std 15.16308 14.600192 15.195657\n", "min 0.00000 17.000000 10.000000\n", "25% 57.00000 59.000000 57.750000\n", "50% 66.00000 70.000000 69.000000\n", "75% 77.00000 79.000000 79.000000\n", "max 100.00000 100.000000 100.000000" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.describe()" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "RangeIndex: 1000 entries, 0 to 999\n", "Data columns (total 8 columns):\n", " # Column Non-Null Count Dtype \n", "--- ------ -------------- ----- \n", " 0 gender 1000 non-null object\n", " 1 race_ethnicity 1000 non-null object\n", " 2 parental_level_of_education 1000 non-null object\n", " 3 lunch 1000 non-null object\n", " 4 test_preparation_course 1000 non-null object\n", " 5 math_score 1000 non-null int64 \n", " 6 reading_score 1000 non-null int64 \n", " 7 writing_score 1000 non-null int64 \n", "dtypes: int64(3), object(5)\n", "memory usage: 62.6+ KB\n" ] } ], "source": [ "df.info()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }