{"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":"# 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)\nfrom pathlib import Path\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\npath_par = Path(r'/kaggle/input/')\npath = Path(r'/kaggle/input/amex-default-prediction')","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-09-18T18:44:06.898826Z","iopub.execute_input":"2022-09-18T18:44:06.899359Z","iopub.status.idle":"2022-09-18T18:44:06.908090Z","shell.execute_reply.started":"2022-09-18T18:44:06.899320Z","shell.execute_reply":"2022-09-18T18:44:06.906356Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ls {path}","metadata":{"execution":{"iopub.status.busy":"2022-09-18T18:44:06.923945Z","iopub.execute_input":"2022-09-18T18:44:06.924476Z","iopub.status.idle":"2022-09-18T18:44:08.427934Z","shell.execute_reply.started":"2022-09-18T18:44:06.924434Z","shell.execute_reply":"2022-09-18T18:44:08.426704Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train = pd.read_csv(path/'train_data.csv',chunksize=50000)\ndf_train_labels = pd.read_csv(path/'train_labels.csv', chunksize=50000)\n","metadata":{"execution":{"iopub.status.busy":"2022-09-18T18:44:08.430064Z","iopub.execute_input":"2022-09-18T18:44:08.430755Z","iopub.status.idle":"2022-09-18T18:44:08.455453Z","shell.execute_reply.started":"2022-09-18T18:44:08.430710Z","shell.execute_reply":"2022-09-18T18:44:08.454556Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# df_test = pd.read_csv(path/'test_data.csv')","metadata":{"execution":{"iopub.status.busy":"2022-09-18T18:44:08.456850Z","iopub.execute_input":"2022-09-18T18:44:08.457370Z","iopub.status.idle":"2022-09-18T18:44:08.462630Z","shell.execute_reply.started":"2022-09-18T18:44:08.457338Z","shell.execute_reply":"2022-09-18T18:44:08.461354Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#df_test.head()","metadata":{"execution":{"iopub.status.busy":"2022-09-18T18:44:08.465932Z","iopub.execute_input":"2022-09-18T18:44:08.466413Z","iopub.status.idle":"2022-09-18T18:44:08.472493Z","shell.execute_reply.started":"2022-09-18T18:44:08.466369Z","shell.execute_reply":"2022-09-18T18:44:08.471658Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#df_test.shape","metadata":{"execution":{"iopub.status.busy":"2022-09-18T18:44:08.473917Z","iopub.execute_input":"2022-09-18T18:44:08.474489Z","iopub.status.idle":"2022-09-18T18:44:08.483683Z","shell.execute_reply.started":"2022-09-18T18:44:08.474445Z","shell.execute_reply":"2022-09-18T18:44:08.482649Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_small = df_train.get_chunk()\ndf_train_labels = df_train_labels.get_chunk()","metadata":{"execution":{"iopub.status.busy":"2022-09-18T18:44:08.485078Z","iopub.execute_input":"2022-09-18T18:44:08.485474Z","iopub.status.idle":"2022-09-18T18:44:10.519244Z","shell.execute_reply.started":"2022-09-18T18:44:08.485433Z","shell.execute_reply":"2022-09-18T18:44:10.517993Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_small.to_csv('small_train.csv')","metadata":{"execution":{"iopub.status.busy":"2022-09-18T18:44:10.520701Z","iopub.execute_input":"2022-09-18T18:44:10.521037Z","iopub.status.idle":"2022-09-18T18:44:22.632803Z","shell.execute_reply.started":"2022-09-18T18:44:10.521006Z","shell.execute_reply":"2022-09-18T18:44:22.631407Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_labels.to_csv('small_train_labels.csv')\n","metadata":{"execution":{"iopub.status.busy":"2022-09-18T18:44:22.635010Z","iopub.execute_input":"2022-09-18T18:44:22.635536Z","iopub.status.idle":"2022-09-18T18:44:22.780639Z","shell.execute_reply.started":"2022-09-18T18:44:22.635475Z","shell.execute_reply":"2022-09-18T18:44:22.779591Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"","metadata":{}},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}