Question: please write code to classify students above and below average based on given code 3. Exploratory Data Analysis (EDA): - We will modify and manipulate
please write code to classify students above and below average based on given code
3. Exploratory Data Analysis (EDA): - We will modify and manipulate our data, so for modeling it is nice to have a copy of the original data - copy the ' G3 ' column into a new variable, - We want to see, which students are above average and which are below: print out how many students got more than a certain grade and set, which grade will be your average threshold: marks in range (min (math[G3]),max(math[G3])) : count =sum([ value>marks for value in math [G3]]) print (f' { marks }>{( count 100)/ len (math) } ) - Now, classify the students as either above or below average (you can change the 'G3' values, as we have it saved anyway), - To get a feeling of a dataset, see how different parameters look for students above and below average create histograms
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
