{"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\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\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 5GB 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","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"cd /kaggle/input/test-recsys/kaggle_tab_1345/","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"import pandas as pd\nimport numpy as np","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df1 = pd.read_csv('tab_1_orders.csv')\ndf3 = pd.read_csv('tab_3_categories.csv')\ndf4 = pd.read_csv('tab_4_user_profiles.csv')\ndf5 = pd.read_csv('tab_5_product_properties.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"cd ..","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df6 = pd.read_csv('tab_6_city.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"cd /kaggle/input/test-recsys/sbermarket_tab_2_1/","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_1_1 = pd.read_csv('tab_2_products_2020-01-01.csv')\ndf2_1_2 = pd.read_csv('tab_2_products_2020-01-11.csv')\ndf2_1_3 = pd.read_csv('tab_2_products_2020-01-21.csv')\ndf2_1_4 = pd.read_csv('tab_2_products_2020-01-31.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_1_1['month']=1\ndf2_1_1['moment']=1\ndf2_1_2['month']=1\ndf2_1_2['moment']=2\ndf2_1_3['month']=1\ndf2_1_3['moment']=3\ndf2_1_4['month']=1\ndf2_1_4['moment']=4","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_2_1 = pd.read_csv('tab_2_products_2020-02-10.csv')\ndf2_2_2 = pd.read_csv('tab_2_products_2020-02-20.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_2_1['month']=2\ndf2_2_1['moment']=1\ndf2_2_2['month']=2\ndf2_2_2['moment']=3","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_3_1 = pd.read_csv('tab_2_products_2020-03-01.csv')\ndf2_3_2 = pd.read_csv('tab_2_products_2020-03-11.csv')\ndf2_3_3 = pd.read_csv('tab_2_products_2020-03-21.csv')\ndf2_3_4 = pd.read_csv('tab_2_products_2020-03-31.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_3_1['month']=3\ndf2_3_1['moment']=1\ndf2_3_2['month']=3\ndf2_3_2['moment']=2\ndf2_3_3['month']=3\ndf2_3_3['moment']=3\ndf2_3_4['month']=3\ndf2_3_4['moment']=3","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"cd /kaggle/input/test-recsys/sbermarket_tab_2_2","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_4_1 = pd.read_csv('tab_2_products_2020-04-10.csv')\ndf2_4_2 = pd.read_csv('tab_2_products_2020-04-20.csv')\ndf2_4_3 = pd.read_csv('tab_2_products_2020-04-30.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_4_1['month']=4\ndf2_4_1['moment']=1\ndf2_4_2['month']=4\ndf2_4_2['moment']=2\ndf2_4_3['month']=4\ndf2_4_3['moment']=3","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"cd /kaggle/input/test-recsys/sbermarket_tab_2_3","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_5_1 = pd.read_csv('tab_2_products_2020-05-10.csv')\ndf2_5_2 = pd.read_csv('tab_2_products_2020-05-20.csv')\ndf2_5_3 = pd.read_csv('tab_2_products_2020-05-30.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_5_1['month']=5\ndf2_5_1['moment']=1\ndf2_5_2['month']=5\ndf2_5_2['moment']=2\ndf2_5_3['month']=5\ndf2_5_3['moment']=3","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"cd /kaggle/input/test-recsys/sbermarket_tab_2_4","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_6_1 = pd.read_csv('tab_2_products_2020-06-09.csv')\ndf2_6_2 = pd.read_csv('tab_2_products_2020-06-19.csv')\ndf2_6_3 = pd.read_csv('tab_2_products_2020-06-29.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_6_1['month']=6\ndf2_6_1['moment']=1\ndf2_6_2['month']=6\ndf2_6_2['moment']=2\ndf2_6_3['month']=6\ndf2_6_3['moment']=3","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"cd /kaggle/input/test-recsys/sbermarket_tab_2_5","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_7_1 = pd.read_csv('tab_2_products_2020-07-09.csv')\ndf2_7_2 = pd.read_csv('tab_2_products_2020-07-19.csv')\ndf2_7_3 = pd.read_csv('tab_2_products_2020-07-29.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_7_1['month']=7\ndf2_7_1['moment']=1\ndf2_7_2['month']=7\ndf2_7_2['moment']=2\ndf2_7_3['month']=7\ndf2_7_3['moment']=3","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"cd /kaggle/input/test-recsys/sbermarket_tab_2_6","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_8_1 = pd.read_csv('tab_2_products_2020-08-08.csv')\ndf2_8_2 = pd.read_csv('tab_2_products_2020-08-18.csv')\ndf2_8_3 = pd.read_csv('tab_2_products_2020-08-28.csv')\ndf2_9_1 = pd.read_csv('tab_2_products_2020-09-07.csv')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2_8_1['month']=8\ndf2_8_1['moment']=1\ndf2_8_2['month']=8\ndf2_8_2['moment']=2\ndf2_8_3['month']=8\ndf2_8_3['moment']=3\ndf2_9_1['month']=9\ndf2_9_1['moment']=1","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"df2 = pd.concat([df2_1_1,df2_1_2,df2_1_3,df2_1_4,df2_2_1,df2_2_2,df2_3_1,df2_3_2,df2_3_3,df2_3_4,df2_4_1,df2_4_2,df2_4_3,df2_5_1,df2_5_2,df2_5_3,df2_6_1,df2_6_2,df2_6_3,df2_7_1,df2_7_2,df2_7_3,df2_8_1,df2_8_2,df2_8_3,df2_9_1], ignore_index=True)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"`","execution_count":null,"outputs":[]}],"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":4,"nbformat_minor":4}