{"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 pandas as pd\nimport numpy as np\nimport cv2\nimport matplotlib.pyplot as plt\nimport os\nimport random\nimport sys\nfrom tqdm.autonotebook import tqdm\nimport seaborn as sns\nimport glob","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-03-04T08:32:49.219508Z","iopub.execute_input":"2022-03-04T08:32:49.220132Z","iopub.status.idle":"2022-03-04T08:32:49.225243Z","shell.execute_reply.started":"2022-03-04T08:32:49.220094Z","shell.execute_reply":"2022-03-04T08:32:49.224330Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data = pd.read_csv('../input/hotel-id-2021-fgvc8/train.csv')\ns1 = pd.read_csv('../input/hotel-id-2021-fgvc8/sample_submission.csv')","metadata":{"execution":{"iopub.status.busy":"2022-03-04T08:32:53.253929Z","iopub.execute_input":"2022-03-04T08:32:53.254436Z","iopub.status.idle":"2022-03-04T08:32:53.380226Z","shell.execute_reply.started":"2022-03-04T08:32:53.254405Z","shell.execute_reply":"2022-03-04T08:32:53.379467Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print('Train samples:', len(train_data))\nprint('Chains =', len(('../input/hotel-id-2021-fgvc8/train_images')))","metadata":{"execution":{"iopub.status.busy":"2022-03-04T08:33:00.215749Z","iopub.execute_input":"2022-03-04T08:33:00.216015Z","iopub.status.idle":"2022-03-04T08:33:00.221777Z","shell.execute_reply.started":"2022-03-04T08:33:00.215989Z","shell.execute_reply":"2022-03-04T08:33:00.220923Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-04T08:33:16.949142Z","iopub.execute_input":"2022-03-04T08:33:16.949978Z","iopub.status.idle":"2022-03-04T08:33:16.960885Z","shell.execute_reply.started":"2022-03-04T08:33:16.949937Z","shell.execute_reply":"2022-03-04T08:33:16.960260Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data.info()","metadata":{"execution":{"iopub.status.busy":"2022-03-04T08:37:42.239163Z","iopub.execute_input":"2022-03-04T08:37:42.239506Z","iopub.status.idle":"2022-03-04T08:37:42.274276Z","shell.execute_reply.started":"2022-03-04T08:37:42.239474Z","shell.execute_reply":"2022-03-04T08:37:42.273363Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print('Chain IDs = ', len(train_data['chain'].unique()))","metadata":{"execution":{"iopub.status.busy":"2022-03-04T08:37:45.269190Z","iopub.execute_input":"2022-03-04T08:37:45.269642Z","iopub.status.idle":"2022-03-04T08:37:45.276185Z","shell.execute_reply.started":"2022-03-04T08:37:45.269604Z","shell.execute_reply":"2022-03-04T08:37:45.275295Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print('Hotel IDs =', len(train_data['hotel_id'].unique()))","metadata":{"execution":{"iopub.status.busy":"2022-03-04T08:37:48.124149Z","iopub.execute_input":"2022-03-04T08:37:48.124458Z","iopub.status.idle":"2022-03-04T08:37:48.130636Z","shell.execute_reply.started":"2022-03-04T08:37:48.124427Z","shell.execute_reply":"2022-03-04T08:37:48.129739Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data.groupby(['chain', 'hotel_id']).count()","metadata":{"execution":{"iopub.status.busy":"2022-03-04T08:37:50.564626Z","iopub.execute_input":"2022-03-04T08:37:50.565186Z","iopub.status.idle":"2022-03-04T08:37:50.615479Z","shell.execute_reply.started":"2022-03-04T08:37:50.565152Z","shell.execute_reply":"2022-03-04T08:37:50.614662Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_data['chain'].value_counts()","metadata":{"execution":{"iopub.status.busy":"2022-03-04T08:37:54.999416Z","iopub.execute_input":"2022-03-04T08:37:54.999697Z","iopub.status.idle":"2022-03-04T08:37:55.006849Z","shell.execute_reply.started":"2022-03-04T08:37:54.999669Z","shell.execute_reply":"2022-03-04T08:37:55.006311Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pred = s1.copy()\npred['hotel_id'] = 5398\npred.to_csv('submission.csv', index=False)\npred","metadata":{"execution":{"iopub.status.busy":"2022-03-04T08:37:58.818699Z","iopub.execute_input":"2022-03-04T08:37:58.818990Z","iopub.status.idle":"2022-03-04T08:37:58.830624Z","shell.execute_reply.started":"2022-03-04T08:37:58.818960Z","shell.execute_reply":"2022-03-04T08:37:58.829836Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}