{"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 csv\n\npatientIDList = []\npatientIDListUnique = []\n\n# make a list of patient_ids based on the test images listed in test.csv\nfilename = open('../input/mayo-clinic-strip-ai/test.csv', 'r')\n\nfile = csv.DictReader(filename)\n\nfor col in file:\n    patientIDList.append(col['patient_id'])\n\n# make a list of unique patient_ids \nfor element in patientIDList:\n    if element in patientIDListUnique:\n        pass\n    else: \n        patientIDListUnique.append(element)\n           \nf = open('submission.csv', 'w')\nwriter = csv.writer(f)\n        \n#create a header\nwriter.writerow(['patient_id', 'CE', 'LAA'])\n\n#single line per patientid, baseline classification\nfor element in patientIDListUnique:\n    writer.writerow([element,'0.5','0.5'])\n\nf.close()","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-08-15T15:42:20.602732Z","iopub.execute_input":"2022-08-15T15:42:20.603727Z","iopub.status.idle":"2022-08-15T15:42:20.640197Z","shell.execute_reply.started":"2022-08-15T15:42:20.603566Z","shell.execute_reply":"2022-08-15T15:42:20.639336Z"},"trusted":true},"execution_count":null,"outputs":[]}]}