diff --git a/your-code/Admission_Predict.csv b/your-code/Admission_Predict.csv new file mode 100644 index 00000000..a7c1b130 --- /dev/null +++ b/your-code/Admission_Predict.csv @@ -0,0 +1,386 @@ +Serial No.,GRE Score,TOEFL Score,University Rating,SOP,LOR ,CGPA,Research,Chance of Admit +1,337,118,4,4.5,4.5,9.65,1,0.92 +2,316,104,3,3,3.5,8,1,0.72 +3,322,110,3,3.5,2.5,8.67,1,0.8 +4,314,103,2,2,3,8.21,0,0.65 +5,330,115,5,4.5,3,9.34,1,0.9 +6,321,109,3,3,4,8.2,1,0.75 +7,308,101,2,3,4,7.9,0,0.68 +8,302,102,1,2,1.5,8,0,0.5 +9,323,108,3,3.5,3,8.6,0,0.45 +10,327,111,4,4,4.5,9,1,0.84 +11,328,112,4,4,4.5,9.1,1,0.78 +12,307,109,3,4,3,8,1,0.62 +13,311,104,3,3.5,2,8.2,1,0.61 +14,314,105,3,3.5,2.5,8.3,0,0.54 +15,317,107,3,4,3,8.7,0,0.66 +16,319,106,3,4,3,8,1,0.65 +17,318,110,3,4,3,8.8,0,0.63 +18,303,102,3,3.5,3,8.5,0,0.62 +19,325,114,4,3,2,8.4,0,0.7 +20,328,116,5,5,5,9.5,1,0.94 +21,334,119,5,5,4.5,9.7,1,0.95 +22,336,119,5,4,3.5,9.8,1,0.97 +23,322,109,5,4.5,3.5,8.8,0,0.76 +24,298,98,2,1.5,2.5,7.5,1,0.44 +25,295,93,1,2,2,7.2,0,0.46 +26,310,99,2,1.5,2,7.3,0,0.54 +27,300,97,2,3,3,8.1,1,0.65 +28,327,103,3,4,4,8.3,1,0.74 +29,338,118,4,3,4.5,9.4,1,0.91 +30,340,114,5,4,4,9.6,1,0.9 +31,331,112,5,4,5,9.8,1,0.94 +32,320,110,5,5,5,9.2,1,0.88 +33,299,106,2,4,4,8.4,0,0.64 +34,300,105,1,1,2,7.8,0,0.58 +35,304,105,1,3,1.5,7.5,0,0.52 +36,307,108,2,4,3.5,7.7,0,0.48 +37,308,110,3,3.5,3,8,1,0.46 +38,316,105,2,2.5,2.5,8.2,1,0.49 +39,313,107,2,2.5,2,8.5,1,0.53 +40,332,117,4,4.5,4,9.1,0,0.87 +41,326,113,5,4.5,4,9.4,1,0.91 +42,322,110,5,5,4,9.1,1,0.88 +43,329,114,5,4,5,9.3,1,0.86 +44,339,119,5,4.5,4,9.7,0,0.89 +45,321,110,3,3.5,5,8.85,1,0.82 +46,327,111,4,3,4,8.4,1,0.78 +47,313,98,3,2.5,4.5,8.3,1,0.76 +48,312,100,2,1.5,3.5,7.9,1,0.56 +49,334,116,4,4,3,8,1,0.78 +50,324,112,4,4,2.5,8.1,1,0.72 +51,322,110,3,3,3.5,8,0,0.7 +52,320,103,3,3,3,7.7,0,0.64 +53,316,102,3,2,3,7.4,0,0.64 +54,298,99,2,4,2,7.6,0,0.46 +55,300,99,1,3,2,6.8,1,0.36 +56,311,104,2,2,2,8.3,0,0.42 +57,309,100,2,3,3,8.1,0,0.48 +58,307,101,3,4,3,8.2,0,0.47 +59,304,105,2,3,3,8.2,1,0.54 +60,315,107,2,4,3,8.5,1,0.56 +61,325,111,3,3,3.5,8.7,0,0.52 +62,325,112,4,3.5,3.5,8.92,0,0.55 +63,327,114,3,3,3,9.02,0,0.61 +64,316,107,2,3.5,3.5,8.64,1,0.57 +65,318,109,3,3.5,4,9.22,1,0.68 +66,328,115,4,4.5,4,9.16,1,0.78 +67,332,118,5,5,5,9.64,1,0.94 +68,336,112,5,5,5,9.76,1,0.96 +69,321,111,5,5,5,9.45,1,0.93 +70,314,108,4,4.5,4,9.04,1,0.84 +71,314,106,3,3,5,8.9,0,0.74 +72,329,114,2,2,4,8.56,1,0.72 +73,327,112,3,3,3,8.72,1,0.74 +74,301,99,2,3,2,8.22,0,0.64 +75,296,95,2,3,2,7.54,1,0.44 +76,294,93,1,1.5,2,7.36,0,0.46 +77,312,105,3,2,3,8.02,1,0.5 +78,340,120,4,5,5,9.5,1,0.96 +79,320,110,5,5,4.5,9.22,1,0.92 +80,322,115,5,4,4.5,9.36,1,0.92 +81,340,115,5,4.5,4.5,9.45,1,0.94 +82,319,103,4,4.5,3.5,8.66,0,0.76 +83,315,106,3,4.5,3.5,8.42,0,0.72 +84,317,107,2,3.5,3,8.28,0,0.66 +85,314,108,3,4.5,3.5,8.14,0,0.64 +86,318,106,2,4,4,7.92,1,0.64 +87,299,97,3,5,3.5,7.66,0,0.38 +88,298,98,2,4,3,8.03,0,0.34 +89,301,97,2,3,3,7.88,1,0.44 +90,303,99,3,2,2.5,7.66,0,0.36 +91,304,100,4,1.5,2.5,7.84,0,0.42 +92,306,100,2,3,3,8,0,0.48 +93,331,120,3,4,4,8.96,1,0.86 +94,332,119,4,5,4.5,9.24,1,0.9 +95,323,113,3,4,4,8.88,1,0.79 +96,322,107,3,3.5,3.5,8.46,1,0.71 +97,312,105,2,2.5,3,8.12,0,0.64 +98,314,106,2,4,3.5,8.25,0,0.62 +99,317,104,2,4.5,4,8.47,0,0.57 +100,326,112,3,3.5,3,9.05,1,0.74 +101,316,110,3,4,4.5,8.78,1,0.69 +102,329,111,4,4.5,4.5,9.18,1,0.87 +103,338,117,4,3.5,4.5,9.46,1,0.91 +104,331,116,5,5,5,9.38,1,0.93 +105,304,103,5,5,4,8.64,0,0.68 +106,305,108,5,3,3,8.48,0,0.61 +107,321,109,4,4,4,8.68,1,0.69 +108,301,107,3,3.5,3.5,8.34,1,0.62 +109,320,110,2,4,3.5,8.56,0,0.72 +110,311,105,3,3.5,3,8.45,1,0.59 +111,310,106,4,4.5,4.5,9.04,1,0.66 +112,299,102,3,4,3.5,8.62,0,0.56 +113,290,104,4,2,2.5,7.46,0,0.45 +114,296,99,2,3,3.5,7.28,0,0.47 +115,327,104,5,3,3.5,8.84,1,0.71 +116,335,117,5,5,5,9.56,1,0.94 +117,334,119,5,4.5,4.5,9.48,1,0.94 +118,310,106,4,1.5,2.5,8.36,0,0.57 +119,308,108,3,3.5,3.5,8.22,0,0.61 +120,301,106,4,2.5,3,8.47,0,0.57 +121,300,100,3,2,3,8.66,1,0.64 +122,323,113,3,4,3,9.32,1,0.85 +123,319,112,3,2.5,2,8.71,1,0.78 +124,326,112,3,3.5,3,9.1,1,0.84 +125,333,118,5,5,5,9.35,1,0.92 +126,339,114,5,4,4.5,9.76,1,0.96 +127,303,105,5,5,4.5,8.65,0,0.77 +128,323,112,5,4,4.5,8.78,0,0.79 +129,333,113,5,4,4,9.28,1,0.89 +130,314,109,4,3.5,4,8.77,1,0.82 +131,316,100,2,1.5,3,8.16,1,0.71 +132,326,116,2,4.5,3,9.08,1,0.8 +133,318,109,1,3.5,3.5,9.12,0,0.78 +134,329,110,2,4,3,9.15,1,0.84 +135,332,118,2,4.5,3.5,9.36,1,0.9 +136,331,115,5,4,3.5,9.44,1,0.92 +137,340,120,4,4.5,4,9.92,1,0.97 +138,325,112,2,3,3.5,8.96,1,0.8 +139,320,113,2,2,2.5,8.64,1,0.81 +140,315,105,3,2,2.5,8.48,0,0.75 +141,326,114,3,3,3,9.11,1,0.83 +142,339,116,4,4,3.5,9.8,1,0.96 +143,311,106,2,3.5,3,8.26,1,0.79 +144,334,114,4,4,4,9.43,1,0.93 +145,332,116,5,5,5,9.28,1,0.94 +146,321,112,5,5,5,9.06,1,0.86 +147,324,105,3,3,4,8.75,0,0.79 +148,326,108,3,3,3.5,8.89,0,0.8 +149,312,109,3,3,3,8.69,0,0.77 +150,315,105,3,2,2.5,8.34,0,0.7 +151,309,104,2,2,2.5,8.26,0,0.65 +152,306,106,2,2,2.5,8.14,0,0.61 +153,297,100,1,1.5,2,7.9,0,0.52 +154,315,103,1,1.5,2,7.86,0,0.57 +155,298,99,1,1.5,3,7.46,0,0.53 +156,318,109,3,3,3,8.5,0,0.67 +157,317,105,3,3.5,3,8.56,0,0.68 +158,329,111,4,4.5,4,9.01,1,0.81 +159,322,110,5,4.5,4,8.97,0,0.78 +160,302,102,3,3.5,5,8.33,0,0.65 +161,313,102,3,2,3,8.27,0,0.64 +162,293,97,2,2,4,7.8,1,0.64 +163,311,99,2,2.5,3,7.98,0,0.65 +164,312,101,2,2.5,3.5,8.04,1,0.68 +165,334,117,5,4,4.5,9.07,1,0.89 +166,322,110,4,4,5,9.13,1,0.86 +167,323,113,4,4,4.5,9.23,1,0.89 +168,321,111,4,4,4,8.97,1,0.87 +169,320,111,4,4.5,3.5,8.87,1,0.85 +170,329,119,4,4.5,4.5,9.16,1,0.9 +171,319,110,3,3.5,3.5,9.04,0,0.82 +172,309,108,3,2.5,3,8.12,0,0.72 +173,307,102,3,3,3,8.27,0,0.73 +174,300,104,3,3.5,3,8.16,0,0.71 +175,305,107,2,2.5,2.5,8.42,0,0.71 +176,299,100,2,3,3.5,7.88,0,0.68 +177,314,110,3,4,4,8.8,0,0.75 +178,327,113,4,4.5,4.5,9.11,1,0.89 +179,317,107,3,3.5,3,8.68,1,0.84 +180,335,118,5,4.5,3.5,9.44,1,0.93 +181,331,115,5,4.5,3.5,9.36,1,0.93 +182,324,111,5,4.5,4,9.16,1,0.9 +183,323,110,5,4,5,8.98,1,0.87 +184,322,114,5,4.5,4,8.94,1,0.86 +185,336,118,5,4.5,5,9.53,1,0.94 +186,316,109,3,3.5,3,8.76,0,0.77 +187,307,107,2,3,3.5,8.52,1,0.78 +188,306,105,2,3,2.5,8.26,0,0.73 +189,310,106,2,3.5,2.5,8.33,0,0.73 +190,313,107,3,4,4.5,8.69,0,0.72 +191,317,103,3,2.5,3,8.54,1,0.73 +192,315,110,2,3.5,3,8.46,1,0.72 +193,340,120,5,4.5,4.5,9.91,1,0.97 +194,334,120,5,4,5,9.87,1,0.97 +195,298,105,3,3.5,4,8.54,0,0.69 +196,295,99,2,2.5,3,7.65,0,0.57 +197,315,99,2,3.5,3,7.89,0,0.63 +198,310,102,3,3.5,4,8.02,1,0.66 +199,305,106,2,3,3,8.16,0,0.64 +200,301,104,3,3.5,4,8.12,1,0.68 +201,325,108,4,4.5,4,9.06,1,0.79 +202,328,110,4,5,4,9.14,1,0.82 +203,338,120,4,5,5,9.66,1,0.95 +204,333,119,5,5,4.5,9.78,1,0.96 +205,331,117,4,4.5,5,9.42,1,0.94 +206,330,116,5,5,4.5,9.36,1,0.93 +207,322,112,4,4.5,4.5,9.26,1,0.91 +208,321,109,4,4,4,9.13,1,0.85 +209,324,110,4,3,3.5,8.97,1,0.84 +210,312,104,3,3.5,3.5,8.42,0,0.74 +211,313,103,3,4,4,8.75,0,0.76 +212,316,110,3,3.5,4,8.56,0,0.75 +213,308,109,2,3,4,8.45,0,0.71 +214,305,105,2,3,2,8.23,0,0.67 +215,296,99,2,2.5,2.5,8.03,0,0.61 +216,306,110,2,3.5,4,8.45,0,0.63 +217,318,112,3,4,3.5,8.67,0,0.71 +218,324,111,4,3,3,9.01,1,0.82 +219,313,104,3,4,4.5,8.65,0,0.73 +220,319,106,3,3.5,2.5,8.33,1,0.74 +221,312,107,2,2.5,3.5,8.27,0,0.69 +222,304,100,2,2.5,3.5,8.07,0,0.64 +223,330,113,5,5,4,9.31,1,0.91 +224,326,111,5,4.5,4,9.23,1,0.88 +225,325,112,4,4,4.5,9.17,1,0.85 +226,329,114,5,4.5,5,9.19,1,0.86 +227,310,104,3,2,3.5,8.37,0,0.7 +228,299,100,1,1.5,2,7.89,0,0.59 +229,296,101,1,2.5,3,7.68,0,0.6 +230,317,103,2,2.5,2,8.15,0,0.65 +231,324,115,3,3.5,3,8.76,1,0.7 +232,325,114,3,3.5,3,9.04,1,0.76 +233,314,107,2,2.5,4,8.56,0,0.63 +234,328,110,4,4,2.5,9.02,1,0.81 +235,316,105,3,3,3.5,8.73,0,0.72 +236,311,104,2,2.5,3.5,8.48,0,0.71 +237,324,110,3,3.5,4,8.87,1,0.8 +238,321,111,3,3.5,4,8.83,1,0.77 +239,320,104,3,3,2.5,8.57,1,0.74 +240,316,99,2,2.5,3,9,0,0.7 +241,318,100,2,2.5,3.5,8.54,1,0.71 +242,335,115,4,4.5,4.5,9.68,1,0.93 +243,321,114,4,4,5,9.12,0,0.85 +244,307,110,4,4,4.5,8.37,0,0.79 +245,309,99,3,4,4,8.56,0,0.76 +246,324,100,3,4,5,8.64,1,0.78 +247,331,119,4,5,4.5,9.34,1,0.9 +248,327,108,5,5,3.5,9.13,1,0.87 +249,312,104,3,3.5,4,8.09,0,0.71 +250,308,103,2,2.5,4,8.36,1,0.7 +251,324,111,3,2.5,1.5,8.79,1,0.7 +252,325,110,2,3,2.5,8.76,1,0.75 +253,313,102,3,2.5,2.5,8.68,0,0.71 +254,312,105,2,2,2.5,8.45,0,0.72 +255,314,107,3,3,3.5,8.17,1,0.73 +256,327,113,4,4.5,5,9.14,0,0.83 +257,308,108,4,4.5,5,8.34,0,0.77 +258,306,105,2,2.5,3,8.22,1,0.72 +259,299,96,2,1.5,2,7.86,0,0.54 +260,294,95,1,1.5,1.5,7.64,0,0.49 +261,312,99,1,1,1.5,8.01,1,0.52 +262,315,100,1,2,2.5,7.95,0,0.58 +263,322,110,3,3.5,3,8.96,1,0.78 +264,329,113,5,5,4.5,9.45,1,0.89 +265,320,101,2,2.5,3,8.62,0,0.7 +266,308,103,2,3,3.5,8.49,0,0.66 +267,304,102,2,3,4,8.73,0,0.67 +268,311,102,3,4.5,4,8.64,1,0.68 +269,317,110,3,4,4.5,9.11,1,0.8 +270,312,106,3,4,3.5,8.79,1,0.81 +271,321,111,3,2.5,3,8.9,1,0.8 +272,340,112,4,5,4.5,9.66,1,0.94 +273,331,116,5,4,4,9.26,1,0.93 +274,336,118,5,4.5,4,9.19,1,0.92 +275,324,114,5,5,4.5,9.08,1,0.89 +276,314,104,4,5,5,9.02,0,0.82 +277,313,109,3,4,3.5,9,0,0.79 +278,307,105,2,2.5,3,7.65,0,0.58 +279,300,102,2,1.5,2,7.87,0,0.56 +280,302,99,2,1,2,7.97,0,0.56 +281,312,98,1,3.5,3,8.18,1,0.64 +282,316,101,2,2.5,2,8.32,1,0.61 +283,317,100,2,3,2.5,8.57,0,0.68 +284,310,107,3,3.5,3.5,8.67,0,0.76 +285,320,120,3,4,4.5,9.11,0,0.86 +286,330,114,3,4.5,4.5,9.24,1,0.9 +287,305,112,3,3,3.5,8.65,0,0.71 +288,309,106,2,2.5,2.5,8,0,0.62 +289,319,108,2,2.5,3,8.76,0,0.66 +290,322,105,2,3,3,8.45,1,0.65 +291,323,107,3,3.5,3.5,8.55,1,0.73 +292,313,106,2,2.5,2,8.43,0,0.62 +293,321,109,3,3.5,3.5,8.8,1,0.74 +294,323,110,3,4,3.5,9.1,1,0.79 +295,325,112,4,4,4,9,1,0.8 +296,312,108,3,3.5,3,8.53,0,0.69 +297,308,110,4,3.5,3,8.6,0,0.7 +298,320,104,3,3,3.5,8.74,1,0.76 +299,328,108,4,4.5,4,9.18,1,0.84 +300,311,107,4,4.5,4.5,9,1,0.78 +301,301,100,3,3.5,3,8.04,0,0.67 +302,308,104,2,2.5,3,8.07,0,0.65 +303,298,101,2,1.5,2,7.86,0,0.54 +304,300,99,1,1,2.5,8.01,0,0.58 +305,324,111,3,2.5,2,8.8,1,0.79 +306,327,113,4,3.5,3,8.69,1,0.8 +307,317,106,3,4,3.5,8.5,1,0.75 +308,323,104,3,4,4,8.44,1,0.73 +309,314,107,2,2.5,4,8.27,0,0.72 +310,305,102,2,2,2.5,8.18,0,0.62 +311,315,104,3,3,2.5,8.33,0,0.67 +312,326,116,3,3.5,4,9.14,1,0.81 +313,299,100,3,2,2,8.02,0,0.63 +314,295,101,2,2.5,2,7.86,0,0.69 +315,324,112,4,4,3.5,8.77,1,0.8 +316,297,96,2,2.5,1.5,7.89,0,0.43 +317,327,113,3,3.5,3,8.66,1,0.8 +318,311,105,2,3,2,8.12,1,0.73 +319,308,106,3,3.5,2.5,8.21,1,0.75 +320,319,108,3,3,3.5,8.54,1,0.71 +321,312,107,4,4.5,4,8.65,1,0.73 +322,319,110,3,3,2.5,8.79,0,0.72 +323,332,118,5,5,5,9.47,1,0.94 +324,323,108,5,4,4,8.74,1,0.81 +325,324,107,5,3.5,4,8.66,1,0.81 +326,312,107,3,3,3,8.46,1,0.75 +327,326,110,3,3.5,3.5,8.76,1,0.79 +328,308,106,3,3,3,8.24,0,0.58 +329,305,103,2,2.5,3.5,8.13,0,0.59 +330,295,96,2,1.5,2,7.34,0,0.47 +331,316,98,1,1.5,2,7.43,0,0.49 +332,304,97,2,1.5,2,7.64,0,0.47 +333,299,94,1,1,1,7.34,0,0.42 +334,302,99,1,2,2,7.25,0,0.57 +335,313,101,3,2.5,3,8.04,0,0.62 +336,318,107,3,3,3.5,8.27,1,0.74 +337,325,110,4,3.5,4,8.67,1,0.73 +338,303,100,2,3,3.5,8.06,1,0.64 +339,300,102,3,3.5,2.5,8.17,0,0.63 +340,297,98,2,2.5,3,7.67,0,0.59 +341,317,106,2,2,3.5,8.12,0,0.73 +342,327,109,3,3.5,4,8.77,1,0.79 +343,301,104,2,3.5,3.5,7.89,1,0.68 +344,314,105,2,2.5,2,7.64,0,0.7 +345,321,107,2,2,1.5,8.44,0,0.81 +346,322,110,3,4,5,8.64,1,0.85 +347,334,116,4,4,3.5,9.54,1,0.93 +348,338,115,5,4.5,5,9.23,1,0.91 +349,306,103,2,2.5,3,8.36,0,0.69 +350,313,102,3,3.5,4,8.9,1,0.77 +351,330,114,4,4.5,3,9.17,1,0.86 +352,320,104,3,3.5,4.5,8.34,1,0.74 +353,311,98,1,1,2.5,7.46,0,0.57 +354,298,92,1,2,2,7.88,0,0.51 +355,301,98,1,2,3,8.03,1,0.67 +356,310,103,2,2.5,2.5,8.24,0,0.72 +357,324,110,3,3.5,3,9.22,1,0.89 +358,336,119,4,4.5,4,9.62,1,0.95 +359,321,109,3,3,3,8.54,1,0.79 +360,315,105,2,2,2.5,7.65,0,0.39 +361,304,101,2,2,2.5,7.66,0,0.38 +362,297,96,2,2.5,2,7.43,0,0.34 +363,290,100,1,1.5,2,7.56,0,0.47 +364,303,98,1,2,2.5,7.65,0,0.56 +365,311,99,1,2.5,3,8.43,1,0.71 +366,322,104,3,3.5,4,8.84,1,0.78 +367,319,105,3,3,3.5,8.67,1,0.73 +368,324,110,4,4.5,4,9.15,1,0.82 +369,300,100,3,3,3.5,8.26,0,0.62 +370,340,113,4,5,5,9.74,1,0.96 +371,335,117,5,5,5,9.82,1,0.96 +372,302,101,2,2.5,3.5,7.96,0,0.46 +373,307,105,2,2,3.5,8.1,0,0.53 +374,296,97,2,1.5,2,7.8,0,0.49 +375,320,108,3,3.5,4,8.44,1,0.76 +376,314,102,2,2,2.5,8.24,0,0.64 +377,318,106,3,2,3,8.65,0,0.71 +378,326,112,4,4,3.5,9.12,1,0.84 +379,317,104,2,3,3,8.76,0,0.77 +380,329,111,4,4.5,4,9.23,1,0.89 +381,324,110,3,3.5,3.5,9.04,1,0.82 +382,325,107,3,3,3.5,9.11,1,0.84 +383,330,116,4,5,4.5,9.45,1,0.91 +384,312,103,3,3.5,4,8.78,0,0.67 +385,333,117,4,5,4,9.66,1,0.95 diff --git a/your-code/pandas_1.ipynb b/your-code/pandas_1.ipynb index a6c64554..5797e073 100644 --- a/your-code/pandas_1.ipynb +++ b/your-code/pandas_1.ipynb @@ -19,7 +19,9 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "import pandas as pd\n", @@ -35,8 +37,10 @@ }, { "cell_type": "code", - "execution_count": 2, - "metadata": {}, + "execution_count": 3, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "lst = [5.7, 75.2, 74.4, 84.0, 66.5, 66.3, 55.8, 75.7, 29.1, 43.7]" @@ -44,11 +48,32 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "# your code here" + "execution_count": 7, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0 5.7\n", + "1 75.2\n", + "2 74.4\n", + "3 84.0\n", + "4 66.5\n", + "5 66.3\n", + "6 55.8\n", + "7 75.7\n", + "8 29.1\n", + "9 43.7\n", + "dtype: float64\n" + ] + } + ], + "source": [ + "series1 = pd.Series(lst)\n", + "print(series1)" ] }, { @@ -62,11 +87,22 @@ }, { "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], + "execution_count": 11, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "74.4\n" + ] + } + ], "source": [ - "# your code here" + "third_value = series1[2]\n", + "print(third_value)" ] }, { @@ -78,8 +114,10 @@ }, { "cell_type": "code", - "execution_count": 5, - "metadata": {}, + "execution_count": 13, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "b = [[53.1, 95.0, 67.5, 35.0, 78.4],\n", @@ -96,11 +134,32 @@ }, { "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [], - "source": [ - "# your code here" + "execution_count": 17, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " 0 1 2 3 4\n", + "0 53.1 95.0 67.5 35.0 78.4\n", + "1 61.3 40.8 30.8 37.8 87.6\n", + "2 20.6 73.2 44.2 14.6 91.8\n", + "3 57.4 0.1 96.1 4.2 69.5\n", + "4 83.6 20.5 85.4 22.8 35.9\n", + "5 49.0 69.0 0.1 31.8 89.1\n", + "6 23.3 40.7 95.0 83.8 26.9\n", + "7 27.6 26.4 53.8 88.8 68.5\n", + "8 96.6 96.4 53.4 72.4 50.1\n", + "9 73.7 39.0 43.2 81.6 34.7\n" + ] + } + ], + "source": [ + "df = pd.DataFrame(b)\n", + "print(df)" ] }, { @@ -130,11 +189,32 @@ }, { "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [], - "source": [ - "# your code here" + "execution_count": 23, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " score_1 score_2 score_3 score_4 score_5\n", + "0 53.1 95.0 67.5 35.0 78.4\n", + "1 61.3 40.8 30.8 37.8 87.6\n", + "2 20.6 73.2 44.2 14.6 91.8\n", + "3 57.4 0.1 96.1 4.2 69.5\n", + "4 83.6 20.5 85.4 22.8 35.9\n", + "5 49.0 69.0 0.1 31.8 89.1\n", + "6 23.3 40.7 95.0 83.8 26.9\n", + "7 27.6 26.4 53.8 88.8 68.5\n", + "8 96.6 96.4 53.4 72.4 50.1\n", + "9 73.7 39.0 43.2 81.6 34.7\n" + ] + } + ], + "source": [ + "df.columns = [\"score_1\", \"score_2\", \"score_3\", \"score_4\", \"score_5\"]\n", + "print(df)" ] }, { @@ -146,11 +226,32 @@ }, { "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "# your code here" + "execution_count": 29, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " score_1 score_3 score_5\n", + "0 53.1 67.5 78.4\n", + "1 61.3 30.8 87.6\n", + "2 20.6 44.2 91.8\n", + "3 57.4 96.1 69.5\n", + "4 83.6 85.4 35.9\n", + "5 49.0 0.1 89.1\n", + "6 23.3 95.0 26.9\n", + "7 27.6 53.8 68.5\n", + "8 96.6 53.4 50.1\n", + "9 73.7 43.2 34.7\n" + ] + } + ], + "source": [ + "df1 = df[[\"score_1\", \"score_3\", \"score_5\"]]\n", + "print(df1)" ] }, { @@ -162,11 +263,22 @@ }, { "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [], + "execution_count": 39, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "56.95000000000001\n" + ] + } + ], "source": [ - "# your code here" + "avg_score_3 = df[\"score_3\"].mean()\n", + "print(avg_score_3)" ] }, { @@ -178,11 +290,22 @@ }, { "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], + "execution_count": 41, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "88.8\n" + ] + } + ], "source": [ - "# your code here" + "max_score_4 = df[\"score_4\"].max()\n", + "print(max_score_4)" ] }, { @@ -194,11 +317,22 @@ }, { "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], + "execution_count": 43, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "40.75\n" + ] + } + ], "source": [ - "# your code here" + "med_score_2 = df[\"score_2\"].median()\n", + "print(med_score_2)" ] }, { @@ -210,8 +344,10 @@ }, { "cell_type": "code", - "execution_count": 13, - "metadata": {}, + "execution_count": 45, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "orders = {'Description': ['LUNCH BAG APPLE DESIGN',\n", @@ -231,11 +367,32 @@ }, { "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [], - "source": [ - "# your code here" + "execution_count": 47, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Description Quantity UnitPrice Revenue\n", + "0 LUNCH BAG APPLE DESIGN 1 1.65 1.65\n", + "1 SET OF 60 VINTAGE LEAF CAKE CASES 24 0.55 13.20\n", + "2 RIBBON REEL STRIPES DESIGN 1 1.65 1.65\n", + "3 WORLD WAR 2 GLIDERS ASSTD DESIGNS 2880 0.18 518.40\n", + "4 PLAYING CARDS JUBILEE UNION JACK 2 1.25 2.50\n", + "5 POPCORN HOLDER 7 0.85 5.95\n", + "6 BOX OF VINTAGE ALPHABET BLOCKS 1 11.95 11.95\n", + "7 PARTY BUNTING 4 4.95 19.80\n", + "8 JAZZ HEARTS ADDRESS BOOK 10 0.19 1.90\n", + "9 SET OF 4 SANTA PLACE SETTINGS 48 1.25 60.00\n" + ] + } + ], + "source": [ + "orders_df = pd.DataFrame(orders)\n", + "print(orders_df)" ] }, { @@ -247,11 +404,26 @@ }, { "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "# your code here" + "execution_count": 49, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total Quantity is 2978\n", + "Total Revenue is 637.0\n" + ] + } + ], + "source": [ + "total_qty = orders_df[\"Quantity\"].sum()\n", + "total_rev = orders_df[\"Revenue\"].sum()\n", + "\n", + "print(\"Total Quantity is \", total_qty)\n", + "print(\"Total Revenue is \", total_rev)" ] }, { @@ -263,11 +435,31 @@ }, { "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [], - "source": [ - "# your code here" + "execution_count": 53, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The most expensive price is 11.95\n", + "The least expensive price is 0.18\n", + "The difference is 11.77\n" + ] + } + ], + "source": [ + "max_price = orders_df[\"UnitPrice\"].max()\n", + "min_price = orders_df[\"UnitPrice\"].min()\n", + "\n", + "price_diff = max_price - min_price\n", + "\n", + "print(\"The most expensive price is \", max_price)\n", + "print(\"The least expensive price is \", min_price)\n", + "\n", + "print(\"The difference is \", price_diff)" ] }, { @@ -279,12 +471,14 @@ }, { "cell_type": "code", - "execution_count": 17, - "metadata": {}, + "execution_count": 57, + "metadata": { + "tags": [] + }, "outputs": [], "source": [ "# Run this code:\n", - "admissions = pd.read_csv('../Admission_Predict.csv')" + "admissions = pd.read_csv('C:/IRONHACK/WEEK_2/DAY_2/lab-pandas-en/Admission_Predict.csv')" ] }, { @@ -296,11 +490,131 @@ }, { "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [], - "source": [ - "# your code here" + "execution_count": 59, + "metadata": { + "tags": [] + }, + "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", + "
Serial No.GRE ScoreTOEFL ScoreUniversity RatingSOPLORCGPAResearchChance of Admit
0133711844.54.59.6510.92
1231610433.03.58.0010.72
2332211033.52.58.6710.80
3431410322.03.08.2100.65
4533011554.53.09.3410.90
\n", + "
" + ], + "text/plain": [ + " Serial No. GRE Score TOEFL Score University Rating SOP LOR CGPA \\\n", + "0 1 337 118 4 4.5 4.5 9.65 \n", + "1 2 316 104 3 3.0 3.5 8.00 \n", + "2 3 322 110 3 3.5 2.5 8.67 \n", + "3 4 314 103 2 2.0 3.0 8.21 \n", + "4 5 330 115 5 4.5 3.0 9.34 \n", + "\n", + " Research Chance of Admit \n", + "0 1 0.92 \n", + "1 1 0.72 \n", + "2 1 0.80 \n", + "3 0 0.65 \n", + "4 1 0.90 " + ] + }, + "execution_count": 59, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "admissions.head()" ] }, { @@ -312,11 +626,31 @@ }, { "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [], - "source": [ - "# your code here" + "execution_count": 63, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Missing data is Serial No. 0\n", + "GRE Score 0\n", + "TOEFL Score 0\n", + "University Rating 0\n", + "SOP 0\n", + "LOR 0\n", + "CGPA 0\n", + "Research 0\n", + "Chance of Admit 0\n", + "dtype: int64\n" + ] + } + ], + "source": [ + "missing_data = admissions.isnull().sum()\n", + "print(\"Missing data is \",missing_data)" ] }, { @@ -328,11 +662,50 @@ }, { "cell_type": "code", - "execution_count": 20, - "metadata": {}, - "outputs": [], - "source": [ - "# your code here" + "execution_count": 65, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Serial No. GRE Score TOEFL Score University Rating SOP LOR \\\n", + "Serial No. \n", + "1 1 337 118 4 4.5 4.5 \n", + "2 2 316 104 3 3.0 3.5 \n", + "3 3 322 110 3 3.5 2.5 \n", + "4 4 314 103 2 2.0 3.0 \n", + "5 5 330 115 5 4.5 3.0 \n", + "... ... ... ... ... ... ... \n", + "381 381 324 110 3 3.5 3.5 \n", + "382 382 325 107 3 3.0 3.5 \n", + "383 383 330 116 4 5.0 4.5 \n", + "384 384 312 103 3 3.5 4.0 \n", + "385 385 333 117 4 5.0 4.0 \n", + "\n", + " CGPA Research Chance of Admit \n", + "Serial No. \n", + "1 9.65 1 0.92 \n", + "2 8.00 1 0.72 \n", + "3 8.67 1 0.80 \n", + "4 8.21 0 0.65 \n", + "5 9.34 1 0.90 \n", + "... ... ... ... \n", + "381 9.04 1 0.82 \n", + "382 9.11 1 0.84 \n", + "383 9.45 1 0.91 \n", + "384 8.78 0 0.67 \n", + "385 9.66 1 0.95 \n", + "\n", + "[385 rows x 9 columns]\n" + ] + } + ], + "source": [ + "admissions = admissions.set_index(\"Serial No.\", drop = False)\n", + "print(admissions)" ] }, { @@ -351,13 +724,52 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 71, "metadata": { - "scrolled": true + "scrolled": true, + "tags": [] }, - "outputs": [], - "source": [ - "# your code here" + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Serial No. GRE Score TOEFL Score University Rating SOP LOR \\\n", + "Serial No. \n", + "1 1 337 118 4 4.5 4.5 \n", + "5 5 330 115 5 4.5 3.0 \n", + "11 11 328 112 4 4.0 4.5 \n", + "20 20 328 116 5 5.0 5.0 \n", + "21 21 334 119 5 5.0 4.5 \n", + "... ... ... ... ... ... ... \n", + "380 380 329 111 4 4.5 4.0 \n", + "381 381 324 110 3 3.5 3.5 \n", + "382 382 325 107 3 3.0 3.5 \n", + "383 383 330 116 4 5.0 4.5 \n", + "385 385 333 117 4 5.0 4.0 \n", + "\n", + " CGPA Research Chance of Admit \n", + "Serial No. \n", + "1 9.65 1 0.92 \n", + "5 9.34 1 0.90 \n", + "11 9.10 1 0.78 \n", + "20 9.50 1 0.94 \n", + "21 9.70 1 0.95 \n", + "... ... ... ... \n", + "380 9.23 1 0.89 \n", + "381 9.04 1 0.82 \n", + "382 9.11 1 0.84 \n", + "383 9.45 1 0.91 \n", + "385 9.66 1 0.95 \n", + "\n", + "[101 rows x 9 columns]\n" + ] + } + ], + "source": [ + "condition1 = (admissions[\"CGPA\"] > 9) & (admissions[\"Research\"] == 1)\n", + "filtered_research = admissions[condition1]\n", + "print(filtered_research)" ] }, { @@ -369,12 +781,49 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 79, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Serial No. GRE Score TOEFL Score University Rating SOP LOR \\\n", + "Serial No. \n", + "29 29 338 118 4 3.0 4.5 \n", + "63 63 327 114 3 3.0 3.0 \n", + "141 141 326 114 3 3.0 3.0 \n", + "218 218 324 111 4 3.0 3.0 \n", + "382 382 325 107 3 3.0 3.5 \n", + "\n", + " CGPA Research Chance of Admit \n", + "Serial No. \n", + "29 9.40 1 0.91 \n", + "63 9.02 0 0.61 \n", + "141 9.11 1 0.83 \n", + "218 9.01 1 0.82 \n", + "382 9.11 1 0.84 \n", + "Mean Chance of Admit is 0.8019999999999999\n" + ] + } + ], + "source": [ + "filtered_df = admissions[(admissions[\"CGPA\"] > 9) & (admissions[\"SOP\"] < 3.5)]\n", + "print(filtered_df)\n", + "\n", + "average_chance = filtered_df[\"Chance of Admit \"].mean()\n", + "\n", + "print(\"Mean Chance of Admit is\", average_chance)" + ] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": {}, "outputs": [], - "source": [ - "# your code here" - ] + "source": [] } ], "metadata": { @@ -393,7 +842,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.11.13" }, "toc": { "base_numbering": "", @@ -410,5 +859,5 @@ } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 }