{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport missingno as msno\nimport plotly.express as px","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-02-10T16:11:20.203994Z","iopub.execute_input":"2023-02-10T16:11:20.204988Z","iopub.status.idle":"2023-02-10T16:11:22.866947Z","shell.execute_reply.started":"2023-02-10T16:11:20.204854Z","shell.execute_reply":"2023-02-10T16:11:22.865802Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.read_csv(\"/kaggle/input/predict-student-performance-from-game-play/train.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:11:22.869139Z","iopub.execute_input":"2023-02-10T16:11:22.869943Z","iopub.status.idle":"2023-02-10T16:12:32.613103Z","shell.execute_reply.started":"2023-02-10T16:11:22.869885Z","shell.execute_reply":"2023-02-10T16:12:32.611832Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.head()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:12:32.615187Z","iopub.execute_input":"2023-02-10T16:12:32.615649Z","iopub.status.idle":"2023-02-10T16:12:32.653998Z","shell.execute_reply.started":"2023-02-10T16:12:32.615615Z","shell.execute_reply":"2023-02-10T16:12:32.653009Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.columns\ndf.info()\ndf.describe()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:12:32.657167Z","iopub.execute_input":"2023-02-10T16:12:32.657895Z","iopub.status.idle":"2023-02-10T16:12:39.686008Z","shell.execute_reply.started":"2023-02-10T16:12:32.657852Z","shell.execute_reply":"2023-02-10T16:12:39.684849Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.drop(['session_id', 'index','music'],axis=1,inplace=True)","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:20:36.936182Z","iopub.execute_input":"2023-02-10T16:20:36.937308Z","iopub.status.idle":"2023-02-10T16:20:37.034251Z","shell.execute_reply.started":"2023-02-10T16:20:36.937184Z","shell.execute_reply":"2023-02-10T16:20:37.032978Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df[df.duplicated()]","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:12:41.084665Z","iopub.execute_input":"2023-02-10T16:12:41.085064Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.drop_duplicates(inplace=True)","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.isnull().sum()","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.drop('page',axis=1,inplace=True)\ndf.drop('text',axis=1,inplace=True)\ndf.drop('text_fqid',axis=1,inplace=True)\ndf.drop('fullscreen',axis=1,inplace=True)\ndf.drop('room_coor_x',axis=1,inplace=True)\ndf.drop('screen_coor_y',axis=1,inplace=True)\ndf.drop('screen_coor_x',axis=1,inplace=True)\ndf.drop('room_coor_y',axis=1,inplace=True)\ndf.drop('hover_duration',axis=1,inplace=True)\ndf.drop('fqid',axis=1,inplace=True)\ndf.drop('hq',axis=1,inplace=True)","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.isnull().sum().sum()","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(5,3))\nsns.countplot('elapsed_time',data=df)\nplt.show()","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(5,3))\nsns.countplot('level',data=df)\nplt.show()","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(5,3))\nsns.countplot('level_group',data=df)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:20:58.035211Z","iopub.execute_input":"2023-02-10T16:20:58.035633Z","iopub.status.idle":"2023-02-10T16:20:58.062211Z","shell.execute_reply.started":"2023-02-10T16:20:58.035599Z","shell.execute_reply":"2023-02-10T16:20:58.059452Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(5,3))\nsns.countplot('level',hue='elapsed_time',data=df)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:21:04.310396Z","iopub.execute_input":"2023-02-10T16:21:04.310825Z","iopub.status.idle":"2023-02-10T16:21:04.335815Z","shell.execute_reply.started":"2023-02-10T16:21:04.310794Z","shell.execute_reply":"2023-02-10T16:21:04.332686Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(5,3))\nsns.countplot('level_group',hue='elapsed_time',data=df)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:21:10.14809Z","iopub.execute_input":"2023-02-10T16:21:10.148493Z","iopub.status.idle":"2023-02-10T16:21:10.170028Z","shell.execute_reply.started":"2023-02-10T16:21:10.148461Z","shell.execute_reply":"2023-02-10T16:21:10.167693Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(5,3))\nsns.histplot(df['level_group'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:21:16.132998Z","iopub.execute_input":"2023-02-10T16:21:16.133396Z","iopub.status.idle":"2023-02-10T16:21:16.156264Z","shell.execute_reply.started":"2023-02-10T16:21:16.133366Z","shell.execute_reply":"2023-02-10T16:21:16.152991Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(5,3))\nsns.histplot(df['level'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:21:21.842675Z","iopub.execute_input":"2023-02-10T16:21:21.84311Z","iopub.status.idle":"2023-02-10T16:21:21.863005Z","shell.execute_reply.started":"2023-02-10T16:21:21.843077Z","shell.execute_reply":"2023-02-10T16:21:21.860655Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(5,3))\nsns.histplot(df['elapsed_time'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:21:28.115054Z","iopub.execute_input":"2023-02-10T16:21:28.115464Z","iopub.status.idle":"2023-02-10T16:21:28.140175Z","shell.execute_reply.started":"2023-02-10T16:21:28.115432Z","shell.execute_reply":"2023-02-10T16:21:28.137344Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(5,3))\nsns.swarmplot(df['level'])\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:21:34.233637Z","iopub.execute_input":"2023-02-10T16:21:34.234065Z","iopub.status.idle":"2023-02-10T16:21:34.256074Z","shell.execute_reply.started":"2023-02-10T16:21:34.234021Z","shell.execute_reply":"2023-02-10T16:21:34.253575Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.figure(figsize=(5,3))\nsns.heatmap(df.corr(),annot=True)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:21:39.458901Z","iopub.execute_input":"2023-02-10T16:21:39.459998Z","iopub.status.idle":"2023-02-10T16:21:39.483615Z","shell.execute_reply.started":"2023-02-10T16:21:39.459953Z","shell.execute_reply":"2023-02-10T16:21:39.482316Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.pairplot(hue='elapsed_time',data=df)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-02-10T16:21:44.757447Z","iopub.execute_input":"2023-02-10T16:21:44.757868Z","iopub.status.idle":"2023-02-10T16:21:44.774822Z","shell.execute_reply.started":"2023-02-10T16:21:44.757836Z","shell.execute_reply":"2023-02-10T16:21:44.773622Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}