{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# dslr\n", "\n", "DataScience project of school 42" ] }, { "cell_type": "code", "execution_count": 4, "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", " \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", "
IndexHogwarts HouseFirst NameLast NameBirthdayBest HandArithmancyAstronomyHerbologyDefense Against the Dark ArtsDivinationMuggle StudiesAncient RunesHistory of MagicTransfigurationPotionsCare of Magical CreaturesCharmsFlying
00RavenclawTamaraHsu2000-03-30Left58384.0-487.8860865.7271804.8788614.722272.035831532.4842265.2310581039.7882813.7903690.715939-232.79405-26.89
11SlytherinErichParedes1999-10-14Right67239.0-552.060507-5.9874465.520605-5.612-487.340557367.7603034.1071701058.9445927.2487420.091674-252.18425-113.45
22RavenclawStephanyBraun1999-11-03Left23702.0-366.0761177.7250173.6607616.140664.893521602.5852843.5555791088.0883488.728531-0.515327-227.3426530.42
33GryffindorVestaMcmichael2000-08-19Left32667.0697.742809-6.497214-6.9774284.026-537.001128523.982133-4.809637920.3914490.821911-0.014040-256.84675200.64
44GryffindorGastonGibbs1998-09-27Left60158.0436.775204-7.820623NaN2.236-444.262537599.324514-3.444377937.4347244.311066-0.264070-256.38730157.98
\n", "
" ], "text/plain": [ " Index Hogwarts House First Name Last Name Birthday Best Hand \\\n", "0 0 Ravenclaw Tamara Hsu 2000-03-30 Left \n", "1 1 Slytherin Erich Paredes 1999-10-14 Right \n", "2 2 Ravenclaw Stephany Braun 1999-11-03 Left \n", "3 3 Gryffindor Vesta Mcmichael 2000-08-19 Left \n", "4 4 Gryffindor Gaston Gibbs 1998-09-27 Left \n", "\n", " Arithmancy Astronomy Herbology Defense Against the Dark Arts \\\n", "0 58384.0 -487.886086 5.727180 4.878861 \n", "1 67239.0 -552.060507 -5.987446 5.520605 \n", "2 23702.0 -366.076117 7.725017 3.660761 \n", "3 32667.0 697.742809 -6.497214 -6.977428 \n", "4 60158.0 436.775204 -7.820623 NaN \n", "\n", " Divination Muggle Studies Ancient Runes History of Magic \\\n", "0 4.722 272.035831 532.484226 5.231058 \n", "1 -5.612 -487.340557 367.760303 4.107170 \n", "2 6.140 664.893521 602.585284 3.555579 \n", "3 4.026 -537.001128 523.982133 -4.809637 \n", "4 2.236 -444.262537 599.324514 -3.444377 \n", "\n", " Transfiguration Potions Care of Magical Creatures Charms Flying \n", "0 1039.788281 3.790369 0.715939 -232.79405 -26.89 \n", "1 1058.944592 7.248742 0.091674 -252.18425 -113.45 \n", "2 1088.088348 8.728531 -0.515327 -227.34265 30.42 \n", "3 920.391449 0.821911 -0.014040 -256.84675 200.64 \n", "4 937.434724 4.311066 -0.264070 -256.38730 157.98 " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "df = pd.read_csv(\"./datasets/dataset_train.csv\")\n", "df.head()" ] }, { "cell_type": "code", "execution_count": 5, "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", " \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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
IndexArithmancyAstronomyHerbologyDefense Against the Dark ArtsDivinationMuggle StudiesAncient RunesHistory of MagicTransfigurationPotionsCare of Magical CreaturesCharmsFlying
count1600.000001566.0000001568.0000001567.0000001569.0000001561.0000001565.0000001565.0000001557.0000001566.0000001570.0000001560.0000001600.0000001600.000000
mean799.5000049634.57024339.7971311.141020-0.3878633.153910-224.589915495.7479702.9630951030.0969465.950373-0.053427-243.37440921.958012
std462.0245316679.806036520.2982685.2196825.2127944.155301486.344840106.2851654.42577544.1251163.1478540.9714578.78364097.631602
min0.00000-24370.000000-966.740546-10.295663-10.162119-8.727000-1086.496835283.869609-8.858993906.627320-4.697484-3.313676-261.048920-181.470000
25%399.7500038511.500000-489.551387-4.308182-5.2590953.099000-577.580096397.5110472.2186531026.2099933.646785-0.671606-250.652600-41.870000
50%799.5000049013.500000260.2894463.469012-2.5893424.624000-419.164294463.9183054.3781761045.5069965.874837-0.044811-244.867765-2.515000
75%1199.2500060811.250000524.7719495.4191834.9046805.667000254.994857597.4922305.8252421058.4364108.2481730.589919-232.55230550.560000
max1599.00000104956.0000001016.21194011.6128959.66740510.0320001092.388611745.39622011.8897131098.95820113.5367623.056546-225.428140279.070000
\n", "
" ], "text/plain": [ " Index Arithmancy Astronomy Herbology \\\n", "count 1600.00000 1566.000000 1568.000000 1567.000000 \n", "mean 799.50000 49634.570243 39.797131 1.141020 \n", "std 462.02453 16679.806036 520.298268 5.219682 \n", "min 0.00000 -24370.000000 -966.740546 -10.295663 \n", "25% 399.75000 38511.500000 -489.551387 -4.308182 \n", "50% 799.50000 49013.500000 260.289446 3.469012 \n", "75% 1199.25000 60811.250000 524.771949 5.419183 \n", "max 1599.00000 104956.000000 1016.211940 11.612895 \n", "\n", " Defense Against the Dark Arts Divination Muggle Studies \\\n", "count 1569.000000 1561.000000 1565.000000 \n", "mean -0.387863 3.153910 -224.589915 \n", "std 5.212794 4.155301 486.344840 \n", "min -10.162119 -8.727000 -1086.496835 \n", "25% -5.259095 3.099000 -577.580096 \n", "50% -2.589342 4.624000 -419.164294 \n", "75% 4.904680 5.667000 254.994857 \n", "max 9.667405 10.032000 1092.388611 \n", "\n", " Ancient Runes History of Magic Transfiguration Potions \\\n", "count 1565.000000 1557.000000 1566.000000 1570.000000 \n", "mean 495.747970 2.963095 1030.096946 5.950373 \n", "std 106.285165 4.425775 44.125116 3.147854 \n", "min 283.869609 -8.858993 906.627320 -4.697484 \n", "25% 397.511047 2.218653 1026.209993 3.646785 \n", "50% 463.918305 4.378176 1045.506996 5.874837 \n", "75% 597.492230 5.825242 1058.436410 8.248173 \n", "max 745.396220 11.889713 1098.958201 13.536762 \n", "\n", " Care of Magical Creatures Charms Flying \n", "count 1560.000000 1600.000000 1600.000000 \n", "mean -0.053427 -243.374409 21.958012 \n", "std 0.971457 8.783640 97.631602 \n", "min -3.313676 -261.048920 -181.470000 \n", "25% -0.671606 -250.652600 -41.870000 \n", "50% -0.044811 -244.867765 -2.515000 \n", "75% 0.589919 -232.552305 50.560000 \n", "max 3.056546 -225.428140 279.070000 " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.describe()" ] }, { "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.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }