{"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":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-05-18T21:15:27.382992Z","iopub.execute_input":"2023-05-18T21:15:27.383365Z","iopub.status.idle":"2023-05-18T21:15:27.396255Z","shell.execute_reply.started":"2023-05-18T21:15:27.383337Z","shell.execute_reply":"2023-05-18T21:15:27.395431Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.read_csv(\"/kaggle/input/predict-student-performance-from-game-play/sample_submission.csv\")","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"d = pd.read_csv(\"/kaggle/input/predict-student-performance-from-game-play/train_labels.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:23:19.792808Z","iopub.execute_input":"2023-05-18T22:23:19.793618Z","iopub.status.idle":"2023-05-18T22:23:20.247951Z","shell.execute_reply.started":"2023-05-18T22:23:19.793581Z","shell.execute_reply":"2023-05-18T22:23:20.246846Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"d","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:23:27.932733Z","iopub.execute_input":"2023-05-18T22:23:27.933119Z","iopub.status.idle":"2023-05-18T22:23:27.946032Z","shell.execute_reply.started":"2023-05-18T22:23:27.933091Z","shell.execute_reply":"2023-05-18T22:23:27.944992Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"d.head()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:23:45.048773Z","iopub.execute_input":"2023-05-18T22:23:45.049565Z","iopub.status.idle":"2023-05-18T22:23:45.067012Z","shell.execute_reply.started":"2023-05-18T22:23:45.049530Z","shell.execute_reply":"2023-05-18T22:23:45.066208Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.tail()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:23:59.828813Z","iopub.execute_input":"2023-05-18T22:23:59.829227Z","iopub.status.idle":"2023-05-18T22:23:59.838727Z","shell.execute_reply.started":"2023-05-18T22:23:59.829194Z","shell.execute_reply":"2023-05-18T22:23:59.837938Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df1 = pd.read_csv(\"/kaggle/input/predict-student-performance-from-game-play/train_labels.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:18:32.312701Z","iopub.execute_input":"2023-05-18T21:18:32.313501Z","iopub.status.idle":"2023-05-18T21:18:32.720173Z","shell.execute_reply.started":"2023-05-18T21:18:32.313439Z","shell.execute_reply":"2023-05-18T21:18:32.718988Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df1","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:18:44.192569Z","iopub.execute_input":"2023-05-18T21:18:44.192937Z","iopub.status.idle":"2023-05-18T21:18:44.206259Z","shell.execute_reply.started":"2023-05-18T21:18:44.192908Z","shell.execute_reply":"2023-05-18T21:18:44.205406Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2 = pd.read_csv(\"/kaggle/input/predict-student-performance-from-game-play/test.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:19:40.372660Z","iopub.execute_input":"2023-05-18T21:19:40.373381Z","iopub.status.idle":"2023-05-18T21:19:40.409695Z","shell.execute_reply.started":"2023-05-18T21:19:40.373345Z","shell.execute_reply":"2023-05-18T21:19:40.408843Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:19:49.932739Z","iopub.execute_input":"2023-05-18T21:19:49.933122Z","iopub.status.idle":"2023-05-18T21:19:49.976825Z","shell.execute_reply.started":"2023-05-18T21:19:49.933092Z","shell.execute_reply":"2023-05-18T21:19:49.975779Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.describe().T","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:50:49.811984Z","iopub.execute_input":"2023-05-18T21:50:49.812398Z","iopub.status.idle":"2023-05-18T21:50:49.838397Z","shell.execute_reply.started":"2023-05-18T21:50:49.812368Z","shell.execute_reply":"2023-05-18T21:50:49.837625Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2.isna().sum()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:52:10.977182Z","iopub.execute_input":"2023-05-18T21:52:10.977621Z","iopub.status.idle":"2023-05-18T21:52:11.003406Z","shell.execute_reply.started":"2023-05-18T21:52:10.977587Z","shell.execute_reply":"2023-05-18T21:52:11.002336Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2.head(10)","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:52:23.002938Z","iopub.execute_input":"2023-05-18T21:52:23.003342Z","iopub.status.idle":"2023-05-18T21:52:23.033263Z","shell.execute_reply.started":"2023-05-18T21:52:23.003311Z","shell.execute_reply":"2023-05-18T21:52:23.032431Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2.info()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:58:49.579142Z","iopub.execute_input":"2023-05-18T21:58:49.579579Z","iopub.status.idle":"2023-05-18T21:58:49.604119Z","shell.execute_reply.started":"2023-05-18T21:58:49.579543Z","shell.execute_reply":"2023-05-18T21:58:49.603008Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.isnull()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:01:07.052034Z","iopub.execute_input":"2023-05-18T22:01:07.052447Z","iopub.status.idle":"2023-05-18T22:01:07.071153Z","shell.execute_reply.started":"2023-05-18T22:01:07.052415Z","shell.execute_reply":"2023-05-18T22:01:07.069534Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.notnull()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:01:49.572264Z","iopub.execute_input":"2023-05-18T22:01:49.572685Z","iopub.status.idle":"2023-05-18T22:01:49.590877Z","shell.execute_reply.started":"2023-05-18T22:01:49.572654Z","shell.execute_reply":"2023-05-18T22:01:49.589968Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.isna()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:02:14.972257Z","iopub.execute_input":"2023-05-18T22:02:14.972665Z","iopub.status.idle":"2023-05-18T22:02:14.991132Z","shell.execute_reply.started":"2023-05-18T22:02:14.972634Z","shell.execute_reply":"2023-05-18T22:02:14.990203Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2.isnull()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:02:36.091762Z","iopub.execute_input":"2023-05-18T22:02:36.092154Z","iopub.status.idle":"2023-05-18T22:02:36.141355Z","shell.execute_reply.started":"2023-05-18T22:02:36.092124Z","shell.execute_reply":"2023-05-18T22:02:36.140536Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2.notnull()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:03:12.233491Z","iopub.execute_input":"2023-05-18T22:03:12.233890Z","iopub.status.idle":"2023-05-18T22:03:12.276967Z","shell.execute_reply.started":"2023-05-18T22:03:12.233859Z","shell.execute_reply":"2023-05-18T22:03:12.276143Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2.isna()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:03:30.052083Z","iopub.execute_input":"2023-05-18T22:03:30.052538Z","iopub.status.idle":"2023-05-18T22:03:30.104417Z","shell.execute_reply.started":"2023-05-18T22:03:30.052505Z","shell.execute_reply":"2023-05-18T22:03:30.103589Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2.notna()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:03:59.237305Z","iopub.execute_input":"2023-05-18T22:03:59.237732Z","iopub.status.idle":"2023-05-18T22:03:59.287164Z","shell.execute_reply.started":"2023-05-18T22:03:59.237699Z","shell.execute_reply":"2023-05-18T22:03:59.285581Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.notna()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:04:19.516943Z","iopub.execute_input":"2023-05-18T22:04:19.517335Z","iopub.status.idle":"2023-05-18T22:04:19.549648Z","shell.execute_reply.started":"2023-05-18T22:04:19.517304Z","shell.execute_reply":"2023-05-18T22:04:19.548631Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2.dropna(how='all',axis='columns')","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:08:42.022586Z","iopub.execute_input":"2023-05-18T22:08:42.022963Z","iopub.status.idle":"2023-05-18T22:08:42.068519Z","shell.execute_reply.started":"2023-05-18T22:08:42.022935Z","shell.execute_reply":"2023-05-18T22:08:42.067677Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2.fillna(value=1)","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:11:42.182321Z","iopub.execute_input":"2023-05-18T22:11:42.182748Z","iopub.status.idle":"2023-05-18T22:11:42.229683Z","shell.execute_reply.started":"2023-05-18T22:11:42.182716Z","shell.execute_reply":"2023-05-18T22:11:42.228718Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:22:08.097214Z","iopub.execute_input":"2023-05-18T22:22:08.097653Z","iopub.status.idle":"2023-05-18T22:22:08.139334Z","shell.execute_reply.started":"2023-05-18T22:22:08.097622Z","shell.execute_reply":"2023-05-18T22:22:08.138047Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df2.fillna(9)","metadata":{"execution":{"iopub.status.busy":"2023-05-18T22:15:31.473197Z","iopub.execute_input":"2023-05-18T22:15:31.473618Z","iopub.status.idle":"2023-05-18T22:15:31.520236Z","shell.execute_reply.started":"2023-05-18T22:15:31.473586Z","shell.execute_reply":"2023-05-18T22:15:31.519220Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df[\"session\"]","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df[\"session_level\"].describe()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:39:35.981723Z","iopub.execute_input":"2023-05-18T21:39:35.982097Z","iopub.status.idle":"2023-05-18T21:39:35.999776Z","shell.execute_reply.started":"2023-05-18T21:39:35.982068Z","shell.execute_reply":"2023-05-18T21:39:35.998822Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.shape","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:43:36.922150Z","iopub.execute_input":"2023-05-18T21:43:36.922569Z","iopub.status.idle":"2023-05-18T21:43:36.929569Z","shell.execute_reply.started":"2023-05-18T21:43:36.922538Z","shell.execute_reply":"2023-05-18T21:43:36.928598Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['session_level'].fillna(\"0\")","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:38:20.518305Z","iopub.execute_input":"2023-05-18T21:38:20.518710Z","iopub.status.idle":"2023-05-18T21:38:20.526701Z","shell.execute_reply.started":"2023-05-18T21:38:20.518679Z","shell.execute_reply":"2023-05-18T21:38:20.525778Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['session_id'].hist()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:23:08.532157Z","iopub.execute_input":"2023-05-18T21:23:08.535315Z","iopub.status.idle":"2023-05-18T21:23:09.221315Z","shell.execute_reply.started":"2023-05-18T21:23:08.535275Z","shell.execute_reply":"2023-05-18T21:23:09.220386Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['correct'].mean()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:40:47.070573Z","iopub.execute_input":"2023-05-18T21:40:47.075786Z","iopub.status.idle":"2023-05-18T21:40:47.086665Z","shell.execute_reply.started":"2023-05-18T21:40:47.075745Z","shell.execute_reply":"2023-05-18T21:40:47.085780Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"current.info()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:57:00.817987Z","iopub.execute_input":"2023-05-18T21:57:00.818423Z","iopub.status.idle":"2023-05-18T21:57:00.851438Z","shell.execute_reply.started":"2023-05-18T21:57:00.818387Z","shell.execute_reply":"2023-05-18T21:57:00.850048Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.info()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:24:06.391592Z","iopub.execute_input":"2023-05-18T21:24:06.391978Z","iopub.status.idle":"2023-05-18T21:24:06.416277Z","shell.execute_reply.started":"2023-05-18T21:24:06.391949Z","shell.execute_reply":"2023-05-18T21:24:06.415112Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.corr()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:24:42.411771Z","iopub.execute_input":"2023-05-18T21:24:42.412146Z","iopub.status.idle":"2023-05-18T21:24:42.425057Z","shell.execute_reply.started":"2023-05-18T21:24:42.412118Z","shell.execute_reply":"2023-05-18T21:24:42.424069Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['session_level'].max()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:25:53.436430Z","iopub.execute_input":"2023-05-18T21:25:53.439198Z","iopub.status.idle":"2023-05-18T21:25:53.450033Z","shell.execute_reply.started":"2023-05-18T21:25:53.439159Z","shell.execute_reply":"2023-05-18T21:25:53.449187Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['session_level'].min()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:26:25.882496Z","iopub.execute_input":"2023-05-18T21:26:25.885434Z","iopub.status.idle":"2023-05-18T21:26:25.896219Z","shell.execute_reply.started":"2023-05-18T21:26:25.885383Z","shell.execute_reply":"2023-05-18T21:26:25.895282Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.hist()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:21:23.631768Z","iopub.execute_input":"2023-05-18T21:21:23.632155Z","iopub.status.idle":"2023-05-18T21:21:24.133591Z","shell.execute_reply.started":"2023-05-18T21:21:23.632126Z","shell.execute_reply":"2023-05-18T21:21:24.132759Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['session_level'].hist()","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:22:08.731694Z","iopub.execute_input":"2023-05-18T21:22:08.732057Z","iopub.status.idle":"2023-05-18T21:22:09.012806Z","shell.execute_reply.started":"2023-05-18T21:22:08.732029Z","shell.execute_reply":"2023-05-18T21:22:09.011911Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df3 = pd.read_csv(\"/kaggle/input/predict-student-performance-from-game-play/train.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:20:19.912569Z","iopub.execute_input":"2023-05-18T21:20:19.912955Z","iopub.status.idle":"2023-05-18T21:20:20.225217Z","shell.execute_reply.started":"2023-05-18T21:20:19.912926Z","shell.execute_reply":"2023-05-18T21:20:20.224371Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df3","metadata":{"execution":{"iopub.status.busy":"2023-05-18T21:20:31.453028Z","iopub.execute_input":"2023-05-18T21:20:31.453408Z","iopub.status.idle":"2023-05-18T21:20:31.468461Z","shell.execute_reply.started":"2023-05-18T21:20:31.453378Z","shell.execute_reply":"2023-05-18T21:20:31.467707Z"},"trusted":true},"execution_count":null,"outputs":[]}]}