{"nbformat":4,"nbformat_minor":1,"cells":[{"outputs":[],"source":"import gc\nimport numpy as np #For numerical computations\nimport pandas as pd #For data wrangling\nimport matplotlib.pyplot as plt #For basic plotting\n%matplotlib inline  ","execution_count":null,"metadata":{"collapsed":true,"_cell_guid":"cd4eebef-61a0-43c6-ad97-e632f75344cd","_uuid":"1aef47a0093db365f8993ffbce92311fa2e38326"},"cell_type":"code"},{"outputs":[],"source":"inputpath = os.listdir(\"../input\")\n#It is important to define the new datatypes becuase of the space each of the default ones occupy\ndefine_dtypes = {\n    'ip':'uint32',\n    'app':'uint16',\n    'device':'uint16',\n    'os':'uint16',\n    'channel':'uint16',\n    'is_attributed':'uint16',\n    'click_id':'uint32'\n}","execution_count":null,"metadata":{"collapsed":true,"_cell_guid":"1188f208-6dfe-4f36-b824-75428deb4dbd","_uuid":"d042b1d6702455159320cbc7f1aebd180cb9bc2f"},"cell_type":"code"},{"outputs":[],"source":"train_data = pd.read_csv(inputpath+'train.csv', nrows = 1000000,usecols = ['ip','app','device','os','channel','click_time','is_attributed'], dtype = define_dtypes)\ntest_data = pd.read_csv(inputpath+'test.csv',   usecols = ['ip','app','device','os','channel','click_time','click_id'], dtype = define_dtypes)","execution_count":null,"metadata":{"collapsed":true,"_cell_guid":"45cf68e3-0311-4a24-84a2-50e1ff79bb57","_uuid":"221c7ea0532b079066d189d059c79cef71516642"},"cell_type":"code"},{"outputs":[],"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 in \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 \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory\n\nimport os\nprint(os.listdir(\"../input\"))\n\n# Any results you write to the current directory are saved as output.","execution_count":null,"metadata":{"collapsed":true,"_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5"},"cell_type":"code"},{"outputs":[],"source":"","execution_count":null,"metadata":{"collapsed":true,"_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a"},"cell_type":"code"}],"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"nbconvert_exporter":"python","codemirror_mode":{"version":3,"name":"ipython"},"file_extension":".py","version":"3.6.4","name":"python","mimetype":"text/x-python","pygments_lexer":"ipython3"}}}