{"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\n\ndatapath = \"../input/digital-turbine-auction-bid-price-prediction\"\ntrain = pd.read_csv(f\"{datapath}/train_data.csv\",usecols = ['deviceId','winBid'])\ntest = pd.read_csv(f\"{datapath}/test_data.csv\",usecols = ['deviceId','sentPrice'])\n\nsub = test.merge(train,on=['deviceId'],how='left')\nsub['winBid'].fillna(sub['sentPrice'],inplace=True)\nsub.groupby('deviceId').agg({'winBid':'mean'}).to_csv(\"submission.csv\")","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-09-06T14:44:02.612541Z","iopub.execute_input":"2022-09-06T14:44:02.612949Z","iopub.status.idle":"2022-09-06T14:44:13.109803Z","shell.execute_reply.started":"2022-09-06T14:44:02.612918Z","shell.execute_reply":"2022-09-06T14:44:13.108880Z"},"trusted":true},"execution_count":null,"outputs":[]}]}