{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"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 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,"outputs":[]},{"metadata":{"_uuid":"2bc4e10b48532d58ddcc1ebfb39ef9d0b7bd7761"},"cell_type":"markdown","source":"Categories in transactions files are engineered features from geographic information or how payments are made."},{"metadata":{"_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","collapsed":true,"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","trusted":false},"cell_type":"code","source":"df = pd.read_csv('../input/historical_transactions.csv')\ndnew = pd.read_csv('../input/new_merchant_transactions.csv')\ndf = pd.concat([df,dnew])","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"5ef235b1ab3b76d4c517d054f8e18a06b7a39450"},"cell_type":"code","source":"print(set(df.loc[df['category_3']=='A','installments']))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"1e84e34185143697c0e59d469ecd5f09dc7829f6"},"cell_type":"code","source":"print(set(df.loc[df['category_3']=='B','installments']))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"19630261e74f3f1acfe942a45f395ae74d492f29"},"cell_type":"code","source":"print(set(df.loc[df['category_3']=='C','installments']))","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"4e13a7410197b0e921403e64b21194094f91a878"},"cell_type":"markdown","source":"Category 3 is based on how the payment is made."},{"metadata":{"trusted":true,"_uuid":"0c0cab9388556f782cb44e8553405c88298651b4"},"cell_type":"code","source":"print(set(df.loc[df['category_2']==1,'state_id']))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"d65d7e3f6035ce5f1b5c93b5fb5fdf00a3fb2acd"},"cell_type":"code","source":"print(set(df.loc[df['category_2']==2,'state_id']))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"212fb76d947b98ed8c1abbed73c514b78b4fd491"},"cell_type":"code","source":"print(set(df.loc[df['category_2']==3,'state_id']))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"3367c7ca92a8bbadb8617c1e3ef3b6da1d8bc08b"},"cell_type":"code","source":"print(set(df.loc[df['category_2']==4,'state_id']))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"cced89d718a8e4191c5f05ffba9ab19f89eec24d"},"cell_type":"code","source":"print(set(df.loc[df['category_2']==5,'state_id']))","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"a14c59888147522d2f555fe886973ba1f4eb090b"},"cell_type":"markdown","source":"Category 2 is based on the state_id. "},{"metadata":{"trusted":true,"_uuid":"cb5f1bfa5e3b02b417e1012c62a9843f40d9f2c8"},"cell_type":"code","source":"print(set(df.loc[df['category_1']=='Y','city_id']))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"395e41e5c1307552f52c91bd8b09f44ead9af8fa"},"cell_type":"code","source":"print(set(df.loc[df['category_1']=='N','city_id']))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"7001fb26b4667327c5b728ba20b5d7c3fc2fc1e1"},"cell_type":"markdown","source":"Category 1 is influenced by the city_id."}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.6.6","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":1}