{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":50160,"databundleVersionId":7921029,"sourceType":"competition"}],"dockerImageVersionId":30664,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\nlst_files=[]\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        if 'train' in filename:\n            if 'parque' in filename:\n                lst_files.append(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-03-25T17:12:11.997737Z","iopub.execute_input":"2024-03-25T17:12:11.998120Z","iopub.status.idle":"2024-03-25T17:12:13.588245Z","shell.execute_reply.started":"2024-03-25T17:12:11.998089Z","shell.execute_reply":"2024-03-25T17:12:13.587319Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"lst_files.sort()","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:13.592521Z","iopub.execute_input":"2024-03-25T17:12:13.593310Z","iopub.status.idle":"2024-03-25T17:12:13.598985Z","shell.execute_reply.started":"2024-03-25T17:12:13.593272Z","shell.execute_reply":"2024-03-25T17:12:13.597296Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(lst_files)","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:13.601294Z","iopub.execute_input":"2024-03-25T17:12:13.602428Z","iopub.status.idle":"2024-03-25T17:12:13.614354Z","shell.execute_reply.started":"2024-03-25T17:12:13.602213Z","shell.execute_reply":"2024-03-25T17:12:13.613223Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"lst_files[0]","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:13.617739Z","iopub.execute_input":"2024-03-25T17:12:13.618499Z","iopub.status.idle":"2024-03-25T17:12:13.628946Z","shell.execute_reply.started":"2024-03-25T17:12:13.618454Z","shell.execute_reply":"2024-03-25T17:12:13.627745Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df=pd.read_parquet(lst_files[0])#.head()","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:13.630739Z","iopub.execute_input":"2024-03-25T17:12:13.631273Z","iopub.status.idle":"2024-03-25T17:12:21.047263Z","shell.execute_reply.started":"2024-03-25T17:12:13.631230Z","shell.execute_reply":"2024-03-25T17:12:21.046229Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.describe()","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:21.048794Z","iopub.execute_input":"2024-03-25T17:12:21.049503Z","iopub.status.idle":"2024-03-25T17:12:26.445476Z","shell.execute_reply.started":"2024-03-25T17:12:21.049461Z","shell.execute_reply":"2024-03-25T17:12:26.444602Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.head()","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:26.446836Z","iopub.execute_input":"2024-03-25T17:12:26.447403Z","iopub.status.idle":"2024-03-25T17:12:26.486712Z","shell.execute_reply.started":"2024-03-25T17:12:26.447370Z","shell.execute_reply":"2024-03-25T17:12:26.485573Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.isnull().sum()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:26.488165Z","iopub.execute_input":"2024-03-25T17:12:26.488523Z","iopub.status.idle":"2024-03-25T17:12:29.963808Z","shell.execute_reply.started":"2024-03-25T17:12:26.488492Z","shell.execute_reply":"2024-03-25T17:12:29.962792Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['cancelreason_3545846M'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:29.964881Z","iopub.execute_input":"2024-03-25T17:12:29.965630Z","iopub.status.idle":"2024-03-25T17:12:30.178094Z","shell.execute_reply.started":"2024-03-25T17:12:29.965599Z","shell.execute_reply":"2024-03-25T17:12:30.176908Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['childnum_21L'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:30.182197Z","iopub.execute_input":"2024-03-25T17:12:30.182596Z","iopub.status.idle":"2024-03-25T17:12:30.248376Z","shell.execute_reply.started":"2024-03-25T17:12:30.182558Z","shell.execute_reply":"2024-03-25T17:12:30.247392Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['credacc_actualbalance_314A'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:30.249796Z","iopub.execute_input":"2024-03-25T17:12:30.250209Z","iopub.status.idle":"2024-03-25T17:12:30.326703Z","shell.execute_reply.started":"2024-03-25T17:12:30.250177Z","shell.execute_reply":"2024-03-25T17:12:30.325447Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['credacc_credlmt_575A'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:30.328215Z","iopub.execute_input":"2024-03-25T17:12:30.329789Z","iopub.status.idle":"2024-03-25T17:12:30.420041Z","shell.execute_reply.started":"2024-03-25T17:12:30.329737Z","shell.execute_reply":"2024-03-25T17:12:30.418357Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['credacc_maxhisbal_375A'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:30.421700Z","iopub.execute_input":"2024-03-25T17:12:30.422841Z","iopub.status.idle":"2024-03-25T17:12:30.519714Z","shell.execute_reply.started":"2024-03-25T17:12:30.422806Z","shell.execute_reply":"2024-03-25T17:12:30.518074Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['credamount_590A'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:30.521691Z","iopub.execute_input":"2024-03-25T17:12:30.522085Z","iopub.status.idle":"2024-03-25T17:12:30.775459Z","shell.execute_reply.started":"2024-03-25T17:12:30.522050Z","shell.execute_reply":"2024-03-25T17:12:30.773870Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":" df['credtype_587L'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:30.777111Z","iopub.execute_input":"2024-03-25T17:12:30.777473Z","iopub.status.idle":"2024-03-25T17:12:30.982854Z","shell.execute_reply.started":"2024-03-25T17:12:30.777445Z","shell.execute_reply":"2024-03-25T17:12:30.981492Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['currdebt_94A'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:30.984365Z","iopub.execute_input":"2024-03-25T17:12:30.984792Z","iopub.status.idle":"2024-03-25T17:12:31.175800Z","shell.execute_reply.started":"2024-03-25T17:12:30.984754Z","shell.execute_reply":"2024-03-25T17:12:31.174278Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\ndf['downpmt_134A'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:31.177191Z","iopub.execute_input":"2024-03-25T17:12:31.177662Z","iopub.status.idle":"2024-03-25T17:12:31.286879Z","shell.execute_reply.started":"2024-03-25T17:12:31.177620Z","shell.execute_reply":"2024-03-25T17:12:31.285606Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\ndf['education_1138M'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:31.288499Z","iopub.execute_input":"2024-03-25T17:12:31.289135Z","iopub.status.idle":"2024-03-25T17:12:31.497318Z","shell.execute_reply.started":"2024-03-25T17:12:31.289095Z","shell.execute_reply":"2024-03-25T17:12:31.495586Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['familystate_726L'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:31.499096Z","iopub.execute_input":"2024-03-25T17:12:31.499572Z","iopub.status.idle":"2024-03-25T17:12:31.680824Z","shell.execute_reply.started":"2024-03-25T17:12:31.499513Z","shell.execute_reply":"2024-03-25T17:12:31.679602Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"  \ndf['inittransactioncode_279L'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:31.682380Z","iopub.execute_input":"2024-03-25T17:12:31.682836Z","iopub.status.idle":"2024-03-25T17:12:31.888099Z","shell.execute_reply.started":"2024-03-25T17:12:31.682794Z","shell.execute_reply":"2024-03-25T17:12:31.886958Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['isbidproduct_390L'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:31.890000Z","iopub.execute_input":"2024-03-25T17:12:31.890358Z","iopub.status.idle":"2024-03-25T17:12:32.129175Z","shell.execute_reply.started":"2024-03-25T17:12:31.890330Z","shell.execute_reply":"2024-03-25T17:12:32.128056Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":" \ndf['isdebitcard_527L'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:32.130393Z","iopub.execute_input":"2024-03-25T17:12:32.130750Z","iopub.status.idle":"2024-03-25T17:12:32.187696Z","shell.execute_reply.started":"2024-03-25T17:12:32.130720Z","shell.execute_reply":"2024-03-25T17:12:32.186503Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['mainoccupationinc_437A'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:32.188891Z","iopub.execute_input":"2024-03-25T17:12:32.189174Z","iopub.status.idle":"2024-03-25T17:12:32.334772Z","shell.execute_reply.started":"2024-03-25T17:12:32.189151Z","shell.execute_reply":"2024-03-25T17:12:32.333575Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\ndf['maxdpdtolerance_577P'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:32.336286Z","iopub.execute_input":"2024-03-25T17:12:32.336639Z","iopub.status.idle":"2024-03-25T17:12:32.414864Z","shell.execute_reply.started":"2024-03-25T17:12:32.336608Z","shell.execute_reply":"2024-03-25T17:12:32.413552Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"    \ndf['outstandingdebt_522A'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:32.416277Z","iopub.execute_input":"2024-03-25T17:12:32.416674Z","iopub.status.idle":"2024-03-25T17:12:32.597690Z","shell.execute_reply.started":"2024-03-25T17:12:32.416632Z","shell.execute_reply":"2024-03-25T17:12:32.596615Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\ndf['pmtnum_8L'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:32.599084Z","iopub.execute_input":"2024-03-25T17:12:32.599394Z","iopub.status.idle":"2024-03-25T17:12:32.676747Z","shell.execute_reply.started":"2024-03-25T17:12:32.599368Z","shell.execute_reply":"2024-03-25T17:12:32.675450Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['postype_4733339M'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:32.678341Z","iopub.execute_input":"2024-03-25T17:12:32.678674Z","iopub.status.idle":"2024-03-25T17:12:32.890957Z","shell.execute_reply.started":"2024-03-25T17:12:32.678648Z","shell.execute_reply":"2024-03-25T17:12:32.889709Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\ndf['profession_152M'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:32.896161Z","iopub.execute_input":"2024-03-25T17:12:32.896582Z","iopub.status.idle":"2024-03-25T17:12:33.119869Z","shell.execute_reply.started":"2024-03-25T17:12:32.896525Z","shell.execute_reply":"2024-03-25T17:12:33.117939Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['rejectreason_755M'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:33.121615Z","iopub.execute_input":"2024-03-25T17:12:33.122687Z","iopub.status.idle":"2024-03-25T17:12:33.340740Z","shell.execute_reply.started":"2024-03-25T17:12:33.122637Z","shell.execute_reply":"2024-03-25T17:12:33.339544Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\n\ndf['revolvingaccount_394A'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:33.341936Z","iopub.execute_input":"2024-03-25T17:12:33.342260Z","iopub.status.idle":"2024-03-25T17:12:33.449928Z","shell.execute_reply.started":"2024-03-25T17:12:33.342232Z","shell.execute_reply":"2024-03-25T17:12:33.448074Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\ndf['rejectreasonclient_4145042M'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:33.451497Z","iopub.execute_input":"2024-03-25T17:12:33.452244Z","iopub.status.idle":"2024-03-25T17:12:33.662983Z","shell.execute_reply.started":"2024-03-25T17:12:33.452202Z","shell.execute_reply":"2024-03-25T17:12:33.661663Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['status_219L'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:33.665615Z","iopub.execute_input":"2024-03-25T17:12:33.667084Z","iopub.status.idle":"2024-03-25T17:12:33.878289Z","shell.execute_reply.started":"2024-03-25T17:12:33.667046Z","shell.execute_reply":"2024-03-25T17:12:33.876995Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\ndf['tenor_203L'].value_counts()/len(df)*100","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:12:33.879388Z","iopub.execute_input":"2024-03-25T17:12:33.879801Z","iopub.status.idle":"2024-03-25T17:12:33.962625Z","shell.execute_reply.started":"2024-03-25T17:12:33.879771Z","shell.execute_reply":"2024-03-25T17:12:33.961084Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df[df['case_id']==2]","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:13:38.872592Z","iopub.execute_input":"2024-03-25T17:13:38.872998Z","iopub.status.idle":"2024-03-25T17:13:38.900766Z","shell.execute_reply.started":"2024-03-25T17:13:38.872968Z","shell.execute_reply":"2024-03-25T17:13:38.899600Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for i in df.columns:\n    print(\"\\n\",i)\n    print(\"% of null values\",df[i].isnull().sum()/len(df)*100)\n    print(\"number of unique values\",df[i].nunique())\n    #print(df[i].value_counts()/len(df)*100)\n    if df[i].nunique()/len(df)*100<=1:\n        print(\"May be categorical\")\n    else:\n        print(\"May be continous\")","metadata":{"execution":{"iopub.status.busy":"2024-03-25T17:36:16.744951Z","iopub.execute_input":"2024-03-25T17:36:16.745905Z","iopub.status.idle":"2024-03-25T17:36:28.075990Z","shell.execute_reply.started":"2024-03-25T17:36:16.745864Z","shell.execute_reply":"2024-03-25T17:36:28.074797Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Comments on overall file","metadata":{}},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}