{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.14","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":81933,"databundleVersionId":9643020,"sourceType":"competition"}],"dockerImageVersionId":30775,"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"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":"2024-09-24T18:19:49.013270Z","iopub.execute_input":"2024-09-24T18:19:49.013762Z","iopub.status.idle":"2024-09-24T18:19:52.463341Z","shell.execute_reply.started":"2024-09-24T18:19:49.013716Z","shell.execute_reply":"2024-09-24T18:19:52.460692Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df = pd.read_csv('/kaggle/input/child-mind-institute-problematic-internet-use/train.csv')\ntest_df = pd.read_csv('/kaggle/input/child-mind-institute-problematic-internet-use/test.csv')","metadata":{"execution":{"iopub.status.busy":"2024-09-24T18:21:14.134057Z","iopub.execute_input":"2024-09-24T18:21:14.134521Z","iopub.status.idle":"2024-09-24T18:21:14.198022Z","shell.execute_reply.started":"2024-09-24T18:21:14.134477Z","shell.execute_reply":"2024-09-24T18:21:14.197039Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_df.describe()","metadata":{"execution":{"iopub.status.busy":"2024-09-24T18:23:48.771643Z","iopub.execute_input":"2024-09-24T18:23:48.772212Z","iopub.status.idle":"2024-09-24T18:23:48.969681Z","shell.execute_reply.started":"2024-09-24T18:23:48.772153Z","shell.execute_reply":"2024-09-24T18:23:48.968343Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df","metadata":{"execution":{"iopub.status.busy":"2024-09-24T18:26:30.125707Z","iopub.execute_input":"2024-09-24T18:26:30.126163Z","iopub.status.idle":"2024-09-24T18:26:30.173373Z","shell.execute_reply.started":"2024-09-24T18:26:30.126116Z","shell.execute_reply":"2024-09-24T18:26:30.172344Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sample_submission = pd.DataFrame(columns=['id,sii'])","metadata":{"execution":{"iopub.status.busy":"2024-09-24T18:24:44.572560Z","iopub.execute_input":"2024-09-24T18:24:44.573607Z","iopub.status.idle":"2024-09-24T18:24:44.581190Z","shell.execute_reply.started":"2024-09-24T18:24:44.573543Z","shell.execute_reply":"2024-09-24T18:24:44.579848Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import random\nimport pandas as pd\n\nsample_submission = pd.DataFrame(columns=['id', 'sii'])\n\nfor i in range(test_df.shape[0]):\n    row = test_df.iloc[i, :]\n    _id = row['id']\n    \n\n    sii_value = random.randint(0, 3)\n    \n    new_row = pd.DataFrame({'id': [_id], 'sii': [sii_value]})\n    \n    sample_submission = pd.concat([sample_submission, new_row], ignore_index=True)\n\nprint(sample_submission)\n","metadata":{"execution":{"iopub.status.busy":"2024-09-24T18:28:39.981530Z","iopub.execute_input":"2024-09-24T18:28:39.981949Z","iopub.status.idle":"2024-09-24T18:28:40.010902Z","shell.execute_reply.started":"2024-09-24T18:28:39.981908Z","shell.execute_reply":"2024-09-24T18:28:40.009759Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sample_submission.to_csv('submission.csv',index=False)","metadata":{"execution":{"iopub.status.busy":"2024-09-24T18:29:20.473778Z","iopub.execute_input":"2024-09-24T18:29:20.474228Z","iopub.status.idle":"2024-09-24T18:29:20.481146Z","shell.execute_reply.started":"2024-09-24T18:29:20.474180Z","shell.execute_reply":"2024-09-24T18:29:20.479946Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}