{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.12.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":129750,"databundleVersionId":15563344,"isSourceIdPinned":false,"sourceType":"competition"},{"sourceId":14838617,"sourceType":"datasetVersion","datasetId":9490374},{"sourceId":297681850,"sourceType":"kernelVersion"}],"dockerImageVersionId":31259,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import pandas as pd","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2026-02-14T12:46:51.819144Z","iopub.execute_input":"2026-02-14T12:46:51.819462Z","iopub.status.idle":"2026-02-14T12:46:53.210918Z","shell.execute_reply.started":"2026-02-14T12:46:51.819434Z","shell.execute_reply":"2026-02-14T12:46:53.209790Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"sub11 = pd.read_csv('/kaggle/input/datasets/lightningv08/dal-shemagh-challenge-0-753-submission/submission.csv')\nsub26 = pd.read_csv('/kaggle/input/notebooks/lightningv08/dal-shemagh-challenge-pretrained-yolo11n/submission.csv')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-14T12:46:53.212278Z","iopub.execute_input":"2026-02-14T12:46:53.212886Z","iopub.status.idle":"2026-02-14T12:46:53.262797Z","shell.execute_reply.started":"2026-02-14T12:46:53.212843Z","shell.execute_reply":"2026-02-14T12:46:53.261878Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"sub = sub11.copy()\nfor index, row11 in sub11.iterrows():\n    row26 = sub26.loc[index]\n    if row26['right_place'] and not row11['right_place']:\n        sub11.loc[index] = row26\n    elif row11['right_place'] and len(row26['prediction_string']) > len(row11['prediction_string']):\n        sub11.loc[index, 'prediction_string'] = row26['prediction_string']\nsub.to_csv('submission.csv', index=False)\nsub","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-02-14T12:46:53.264886Z","iopub.execute_input":"2026-02-14T12:46:53.265361Z","iopub.status.idle":"2026-02-14T12:46:53.479013Z","shell.execute_reply.started":"2026-02-14T12:46:53.265329Z","shell.execute_reply":"2026-02-14T12:46:53.478010Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null}]}