{"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 copy\n\nimport numpy as np\nimport pandas as pd\n\n# import os\n# for 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":"2022-04-28T14:47:40.581983Z","iopub.execute_input":"2022-04-28T14:47:40.582271Z","iopub.status.idle":"2022-04-28T14:47:40.586349Z","shell.execute_reply.started":"2022-04-28T14:47:40.582240Z","shell.execute_reply":"2022-04-28T14:47:40.585603Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"path = r'../input/fashion-and-beauty-reviews/review_test_post.tsv'\n# path = r'../input/fashion-and-beauty-reviews/review_train.tsv'","metadata":{"execution":{"iopub.status.busy":"2022-04-28T14:42:27.726923Z","iopub.execute_input":"2022-04-28T14:42:27.727223Z","iopub.status.idle":"2022-04-28T14:42:27.730797Z","shell.execute_reply.started":"2022-04-28T14:42:27.727193Z","shell.execute_reply":"2022-04-28T14:42:27.730013Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data = pd.read_csv(path, sep='\\t')\ndata = data.reset_index()","metadata":{"execution":{"iopub.status.busy":"2022-04-28T14:50:41.914667Z","iopub.execute_input":"2022-04-28T14:50:41.914974Z","iopub.status.idle":"2022-04-28T14:50:42.958718Z","shell.execute_reply.started":"2022-04-28T14:50:41.914927Z","shell.execute_reply":"2022-04-28T14:50:42.957938Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"output_data = copy.deepcopy(data[['index']])\noutput_data.columns = ['id']\noutput_data['id'] = output_data['id'] + 1","metadata":{"execution":{"iopub.status.busy":"2022-04-28T14:55:46.295048Z","iopub.execute_input":"2022-04-28T14:55:46.295369Z","iopub.status.idle":"2022-04-28T14:55:46.305343Z","shell.execute_reply.started":"2022-04-28T14:55:46.295337Z","shell.execute_reply":"2022-04-28T14:55:46.304155Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"output_data['rating'] = 3.967641914612185\n","metadata":{"execution":{"iopub.status.busy":"2022-04-28T14:55:47.095586Z","iopub.execute_input":"2022-04-28T14:55:47.096453Z","iopub.status.idle":"2022-04-28T14:55:47.101301Z","shell.execute_reply.started":"2022-04-28T14:55:47.096399Z","shell.execute_reply":"2022-04-28T14:55:47.100524Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"output_data.to_csv('submission.csv', index=False)","metadata":{"execution":{"iopub.status.busy":"2022-04-28T14:55:51.229286Z","iopub.execute_input":"2022-04-28T14:55:51.229570Z","iopub.status.idle":"2022-04-28T14:55:51.565946Z","shell.execute_reply.started":"2022-04-28T14:55:51.229540Z","shell.execute_reply":"2022-04-28T14:55:51.565035Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"output_data","metadata":{"execution":{"iopub.status.busy":"2022-04-28T14:55:48.883876Z","iopub.execute_input":"2022-04-28T14:55:48.884221Z","iopub.status.idle":"2022-04-28T14:55:48.897191Z","shell.execute_reply.started":"2022-04-28T14:55:48.884182Z","shell.execute_reply":"2022-04-28T14:55:48.896298Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# train_path = r'../input/fashion-and-beauty-reviews/review_train.tsv'","metadata":{"execution":{"iopub.status.busy":"2022-04-28T14:57:36.052933Z","iopub.execute_input":"2022-04-28T14:57:36.053314Z","iopub.status.idle":"2022-04-28T14:57:36.058122Z","shell.execute_reply.started":"2022-04-28T14:57:36.053276Z","shell.execute_reply":"2022-04-28T14:57:36.057254Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# train_data = pd.read_csv(train_path, sep='\\t')\n# train_data = train_data.reset_index()","metadata":{"execution":{"iopub.status.busy":"2022-04-28T14:57:58.270589Z","iopub.execute_input":"2022-04-28T14:57:58.271255Z","iopub.status.idle":"2022-04-28T14:58:02.203501Z","shell.execute_reply.started":"2022-04-28T14:57:58.271215Z","shell.execute_reply":"2022-04-28T14:58:02.202803Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# train_data.rating.mean()","metadata":{"execution":{"iopub.status.busy":"2022-04-28T14:58:12.188645Z","iopub.execute_input":"2022-04-28T14:58:12.190926Z","iopub.status.idle":"2022-04-28T14:58:12.199589Z","shell.execute_reply.started":"2022-04-28T14:58:12.190880Z","shell.execute_reply":"2022-04-28T14:58:12.199041Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"","metadata":{}}]}