antitheft159 commited on
Commit
a0c9ce4
·
verified ·
1 Parent(s): 19f0da2

Upload 1259_249_252.py

Browse files
Files changed (1) hide show
  1. 1259_249_252.py +47 -0
1259_249_252.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ """1259_249_252
3
+
4
+ Automatically generated by Colab.
5
+
6
+ Original file is located at
7
+ https://colab.research.google.com/drive/1vs6TIReUJQaUJVTdrxZZRWWFH9nbbMvu
8
+ """
9
+
10
+ import numpy as np
11
+ import pandas as pd
12
+ import matplotlib.pyplot as plt
13
+ import seaborn as sns
14
+
15
+ import os
16
+ for dirname, _, filenames in os.walk('/content/enhanced_student_habits_performance_dataset.csv'):
17
+ for filename in filenames:
18
+ print(os.path.join(dirname, filename))
19
+
20
+ df=pd.read_csv('/content/enhanced_student_habits_performance_dataset.csv')
21
+
22
+ df.info()
23
+
24
+ df.isnull().sum()
25
+
26
+ num_col=df.select_dtypes(exclude='object')
27
+ cat_col=df.select_dtypes(include='object')
28
+ num_col.drop(columns=['student_id'], inplace=True)
29
+
30
+ fig, ax=plt.subplots(3,6,figsize=(20, 10))
31
+ ax=ax.flatten()
32
+ for i, col in enumerate(num_col.columns):
33
+ sns.histplot(kde=True, x=df[col], ax=ax[i])
34
+ plt.title(f'Distribution of {col}')
35
+
36
+ df['exam_anxiety_score'].value_counts()
37
+ print('These students have outrageous exam anxiety score:', end='')
38
+ print((df[df['exam_anxiety_score']==10].shape[0]/df.shape[0])*100)
39
+
40
+ anx=df[df['exam_anxiety_score']==10]
41
+ num_col_anx=anx.select_dtypes(exclude='object')
42
+ num_col_anx.drop(columns=['student_id'], inplace=True)
43
+ fig, ax=plt.subplots(3,6, figsize=(20,10))
44
+ ax=ax.flatten()
45
+ for i, col in enumerate(num_col_anx.columns):
46
+ sns.histplot(kde=True, x=num_col_anx[col],ax=ax[i])
47
+ plt.title(f' Distributoin of {col}')