<jupyter_start><jupyter_text><jupyter_code>import pandas as pd
import numpy as np

%matplotlib inline
import seaborn as sns
df= pd.read_csv('/content/StudentsPerformance.csv')
#UNDERSTAND THE DATA
df.head()
df.tail()
#THE SHAPE OF THE DATA SET
df.shape
#NUMERICAL VALUES STATISTICS
df.describe()
df.columns
#SHOW UNIQUE VALUES
df.nunique()
#UNIQUE ITEMS IN COLUMN
df['parental level of education'].unique()
#CLEAN THE DATA
df.isnull().sum()
#DROP UNNEEDED COLUMNS
student = df.drop(['race/ethnicity','parental level of education'],axis=1)
student.head()
#RELATIONSHIP ANALYSIS CHECK FOR OUTLIERS<jupyter_output><empty_output><jupyter_text><jupyter_code>#CORRELATION MATRIX
corelation = student.corr()
sns.heatmap(corelation, xticklabels=corelation, yticklabels=corelation.columns,annot=True)
sns.pairplot(student)
sns.relplot(x= 'math score', y='reading score',hue='gender', data=student)
sns.relplot(x= 'math score', y='reading score',hue='lunch', data=student)
sns.relplot(x= 'math score', y='reading score',hue='test preparation course', data=student)
sns.distplot(student['math score'])
sns.distplot(student['reading score'])
sns.distplot(student['writing score'],bins=5)
sns.distplot(student['math score'])
passmark = 40
df.isnull().sum()
sns.catplot(x='reading score',kind='box',data=student)
sns.catplot(x='math score',kind='box',data=student)
sns.catplot(x='writing score',kind='box',data=student)
p = sns.countplot(x="math score", data = df, palette="muted")
_ = plt.setp(p.get_xticklabels(), rotation=90) 
df['Math_PassStatus'] = np.where(df['math score']<passmark, 'F', 'P')
df.Math_PassStatus.value_counts()
p = sns.countplot(x='parental level of education', data = df, hue='Math_PassStatus', palette='bright')
_ = plt.setp(p.get_xticklabels(), rotation=90)<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup