{"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\nimport random\nimport os","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-05-31T13:56:11.96274Z","iopub.execute_input":"2022-05-31T13:56:11.963793Z","iopub.status.idle":"2022-05-31T13:56:11.968159Z","shell.execute_reply.started":"2022-05-31T13:56:11.963742Z","shell.execute_reply":"2022-05-31T13:56:11.967493Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# https://www.kaggle.com/code/krist0phersmith/how-to-make-a-submission\n\n## First read the sample submission file provided by the competition into a pandas dataframe\ndf_sample = pd.read_csv(\"../input/amex-default-prediction/sample_submission.csv\")\n\n## Create a list to store our probabilities\nprediction = []\n\n## For the amount of customerID rows, call the random() function and add it's output to our prediction list:\nfor yhat in range(len(df_sample)):\n    prediction.append(random.random())\n\ndf_sample['prediction'] = prediction\n\n## Make sure it worked\nprint(df_sample.head())\n\ndf_sample.to_csv('submission.csv', index=False)\n\n","metadata":{"execution":{"iopub.status.busy":"2022-05-31T13:55:35.893462Z","iopub.execute_input":"2022-05-31T13:55:35.893858Z","iopub.status.idle":"2022-05-31T13:55:41.332911Z","shell.execute_reply.started":"2022-05-31T13:55:35.893828Z","shell.execute_reply":"2022-05-31T13:55:41.332047Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"os.listdir('./')","metadata":{"execution":{"iopub.status.busy":"2022-05-31T13:56:17.083912Z","iopub.execute_input":"2022-05-31T13:56:17.084329Z","iopub.status.idle":"2022-05-31T13:56:17.09497Z","shell.execute_reply.started":"2022-05-31T13:56:17.084295Z","shell.execute_reply":"2022-05-31T13:56:17.094195Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}