{"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","metadata":{"execution":{"iopub.status.busy":"2022-07-09T19:57:12.576702Z","iopub.execute_input":"2022-07-09T19:57:12.577268Z","iopub.status.idle":"2022-07-09T19:57:12.604450Z","shell.execute_reply.started":"2022-07-09T19:57:12.577170Z","shell.execute_reply":"2022-07-09T19:57:12.603690Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# read data\n# train = pd.read_csv('/kaggle/input/foursquare-location-matching/train.csv')\ntrain = pd.read_csv('../input/the-real-train-for-foursquare/train.csv')\ntest = pd.read_csv('/kaggle/input/foursquare-location-matching/test.csv')","metadata":{"execution":{"iopub.status.busy":"2022-07-09T19:57:12.606500Z","iopub.execute_input":"2022-07-09T19:57:12.607136Z","iopub.status.idle":"2022-07-09T19:57:22.057997Z","shell.execute_reply.started":"2022-07-09T19:57:12.607092Z","shell.execute_reply":"2022-07-09T19:57:22.056970Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# trivial submission: only submit self\ntest['matches'] = test['id']","metadata":{"execution":{"iopub.status.busy":"2022-07-09T19:57:22.059177Z","iopub.execute_input":"2022-07-09T19:57:22.059443Z","iopub.status.idle":"2022-07-09T19:57:22.071399Z","shell.execute_reply.started":"2022-07-09T19:57:22.059414Z","shell.execute_reply":"2022-07-09T19:57:22.070658Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ssub = pd.read_csv(\"../input/foursquare-location-matching/sample_submission.csv\")\nssub = ssub.drop(columns=\"matches\")\nssub = ssub.merge(test.loc[:,[\"id\",\"matches\"]])\nssub.to_csv(\"submission.csv\", index=False)\n\nssub.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-09T19:57:22.072822Z","iopub.execute_input":"2022-07-09T19:57:22.073669Z","iopub.status.idle":"2022-07-09T19:57:22.114858Z","shell.execute_reply.started":"2022-07-09T19:57:22.073631Z","shell.execute_reply":"2022-07-09T19:57:22.114063Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}