<jupyter_start><jupyter_text>Student Performance in ExamsThis notebook provides the in depth analysis on the [student performance in exams at public schools](http://roycekimmons.com/tools/generated_data/exams).![img_exam](https://www.sciencenewsforstudents.org/wp-content/uploads/2019/11/860_test_anxiety.png)  Importing Libraries<jupyter_code>#!/usr/bin/env python -W ignore::DeprecationWarning

# Data Handling 
import pandas as pd
import numpy as np
from itertools import combinations

# Visualization
import matplotlib.pyplot as plt
import seaborn as sns
import plotly.express as px
from IPython.display import HTML
plt.rcParams['figure.figsize'] = (14, 8)
sns.set_style('whitegrid')

# Chand=ging directory
%cd '/content/drive/My Drive/DataScience/Data_Science_Head_Start'<jupyter_output>/content/drive/My Drive/DataScience/Data_Science_Head_Start<jupyter_text>Reading Data<jupyter_code>df = pd.read_csv('data/StudentsPerformance.csv')
df.shape
df.info()
df.describe()<jupyter_output><empty_output><jupyter_text>Viewing data<jupyter_code>df.reset_index()
df.head(10)
(df.head(20)
 .style
 .hide_index()
 .bar(color='#70A1D7', vmin=0, subset=['math score'])
 .bar(color='#FF6F61', vmin=0, subset=['reading score'])
 .bar(color='mediumspringgreen', vmin=0, subset=['writing score'])
 .set_caption(''))<jupyter_output><empty_output><jupyter_text>Analysis of categorical attributes A Bar Plot & Count Plot w.r.t **Gender**, **Race/ethnicity**, **Parental Level of Education**, **Lunch** and **Test Preparation Course**.<jupyter_code>for attribute in ['gender', 'race/ethnicity', 'parental level of education', 'lunch', 'test preparation course']:
  f, ax = plt.subplots(1,2)
  data = df[attribute].value_counts().sort_index()
  bar = sns.barplot(x = data.index, y = data, ax = ax[0], palette="Set2",)
  for item in bar.get_xticklabels():
    item.set_rotation(45)
  ax[1].pie(data.values.tolist() , labels= [i.title() for i in data.index.tolist()], autopct='%1.1f%%',shadow=True, startangle=90);
  plt.show()<jupyter_output><empty_output><jupyter_text>Distribution Plots of Numeric Attributes **Math Score**, **Reading Score** and **wrtiting Score**<jupyter_code>for lab, col in zip(['math score', 'reading score', 'writing score'], ['tomato', 'mediumspringgreen', 'blue']):
  sns.distplot(df[lab], label=lab.title(), color = col, ).set(xlabel=lab.title(), ylabel='Count')
  plt.show()<jupyter_output><empty_output><jupyter_text>Relationship Between Numerical Attributes<jupyter_code>for attr, col in zip(list(combinations(['math score', 'reading score', 'writing score'], 2)), ['#77DF79', '#82B3FF', '#F47C7C']):
  sns.jointplot(df[attr[0]], df[attr[1]], color = col)
  plt.show()<jupyter_output><empty_output><jupyter_text>Barplot between **Parent Level of education** and the student score in **Math**, **Reading** and **Writing**<jupyter_code>df.groupby('parental level of education')['math score', 'reading score', 'writing score'].mean().plot(kind = 'bar');<jupyter_output><empty_output><jupyter_text>Barplot between **Parent Level of education** and the student score in **Reading** and **Writing**<jupyter_code>cond_plot = sns.FacetGrid(data=df, col='parental level of education', hue='gender', col_wrap=3, height = 5)
cond_plot.map(sns.scatterplot, 'reading score', 'writing score' );<jupyter_output><empty_output><jupyter_text>Bar graph between **Race/Ethnicity** and **Test Preparation Course**<jupyter_code>df.groupby('race/ethnicity')['test preparation course'].value_counts().plot(kind = 'bar', colormap='Set2')
plt.ylabel('Count');<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1618674867207157, 'fraction_numerical': 0.014816885658372938, 'mean_word_length': 7.769607843137255, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 36, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '32605', 'license': 'MIT', 'n_tokens_mistral': 1289, 'n_tokens_neox': 1227, 'n_words': 262, 'path': 'DataAnalysis/Student_Preformance.ipynb', 'repo_name': 'syamkakarla98/Data_Science_Head_Start', 'size': '3577'}