All the instructions are on the attached zip file. Final document has to be submitted on a Jupyter Notebook file

1 answer below »
All the instructions are on the attached zip file. Final document has to be submitted on a Jupyter Notebook file
Answered 1 days AfterFeb 10, 2021

Answer To: All the instructions are on the attached zip file. Final document has to be submitted on a Jupyter...

Rahul answered on Feb 11 2021
149 Votes
homework-data-cleaning-files-ugf44p3y/__MACOSX/._Homework - Data cleaning - files
homework-data-cleaning-files-ugf44p3y/__MACOSX/Homework - Data cleaning - files/._.DS_Store
homework-data-cleaning-files-ugf44p3y/__MACOSX/Homework - Data cleaning - files/._Instructions.rtf
homework-data-cleaning-files-ugf44p3y/__MACOSX/Homework - Data cleaning - files/._sales test.csv
homework-data-cleaning-files-ugf44p3y/__MACOSX/Homework - Data cleaning - files/._SKU master test.csv
homework-data-cleaning-files-ugf44p3y/__MACOSX/Homework - Data cleaning - files/._transfers test.txt
homework-data-cleaning-files-ugf44p3y/Homework - Data cleaning - files/.DS_Store
homework-data-cleaning-files-ugf44p3y/Homework - Data cleaning - files/.ipynb_checkpoints/Data cleaning homework solution-checkpoint.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Data cleaning homework solution"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Import some basic packages"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import sys, pandas as pd, matplotlib as mpl, matplotlib.pyplot as plt, numpy as np"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" Now let's load our data from the files"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"s=pd.read_csv('sales test.csv', index_col=False)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"sku=pd.read_csv('Sku master test.csv', index_col=False)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"t=pd.read_fwf('transfers test.txt')"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
Unnamed: 0RUN_DATETOFRDATEPRODUCTVENDORQTY
010/3/20195:33:42 PM1512019-05-1340099117BR-012
110/3/20195:33:42 PM212019-05-07801171429058
210/3/20195:33:42 PM212019-05-28801171429058
310/3/20195:33:42 PM212019-01-07WSC117121560100
410/3/20195:33:42 PM312019-01-028011714290510
\n",
"
"
],
"text/plain": [
" Unnamed: 0 RUN_DATE TO FR DATE PRODUCT VENDOR QTY\n",
"0 10/3/2019 5:33:42 PM 1 51 2019-05-13 40099117 BR-01 2\n",
"1 10/3/2019 5:33:42 PM 2 1 2019-05-07 80117 142905 8\n",
"2 10/3/2019 5:33:42 PM 2 1 2019-05-28 80117 142905 8\n",
"3 10/3/2019 5:33:42 PM 2 1 2019-01-07 WSC117 121560 100\n",
"4 10/3/2019 5:33:42 PM 3 1 2019-01-02 80117 142905 10"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ok, everything on the transfers looks good, except that the run date got split in two. But we actually don't need that field. So let's clean up t (transfers)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
TOFRDATEPRODUCTVENDORQTY
01512019-05-1340099117BR-012
1212019-05-07801171429058
2212019-05-28801171429058
3212019-01-07WSC117121560100
4312019-01-028011714290510
5312019-05-208011714290510
6312019-01-21WSC117121560200
7312019-05-16WSC117121560100
8312019-06-07WSC117121560100
9312019-06-20WSC117121560100
10312019-08-30WSC117121560100
114212018-12-07SB117BR-201
12512018-12-274009911714290510
13512018-10-29WSC117121560100
14512018-11-09WSC117121560100
15512019-01-08WSC117121560100
16512019-07-25WSC117121560100
17512019-08-01WSC117121560100
185202018-12-14XLG1171323277
195202019-01-29XLG1171323279
20612019-01-05RSK21171354401
21612018-10-31WSC117121560200
22612019-03-21WSC117121560100
23612019-04-15WSC117121560100
24612019-04-23WSC117121560100
25612019-06-19WSC117121560200
26612019-07-26WSC117121560300
276212019-04-26XLG117BR-203
286212019-07-22XLG117BR-203
29712019-02-26WSC117121560100
.....................
9121202019-07-17XLG1171323273
9221202019-08-12XLG1171323272
932212019-09-26WSC117BR-01100
9422202018-10-30SB1179999201
9522202018-11-06SB1179999201
9622202018-11-06SB1179999201
9722202019-08-16SB1179999201
9822202019-08-16SB1179999201
9922202019-05-29XLG1171323273
10022202019-06-20XLG1171323273
1013112018-11-09AG411710162012
1023112019-02-04AG41171016205
1033112019-04-01AG411710162010
1043112019-05-13AG41171016208
1053112019-06-17AG411710162012
1063112019-04-22G31171355101
1073212019-09-17WSC117121560100
1083312018-12-10K51171355101
1093412018-11-05WSC117121560100
11052512018-10-08JN11741138024
11152512018-11-07JN11741138024
11252512019-01-21JN11741138048
11352512019-05-20JN11741138048
11453512019-01-30DRM9117BR-4530
11553512019-06-05JN11741138012
11653522019-05-28DRM9117BR-5113
117212019-10-07WSC117121560100
1181612019-10-07K51171355104
11916212019-10-07SB117BR-201
1202212019-10-01WSC117121560100
\n",
"

121 rows × 6 columns

\n",
"
"
],
"text/plain": [
" TO FR DATE PRODUCT VENDOR QTY\n",
"0 1 51 2019-05-13 40099117 BR-01 2\n",
"1 2 1 2019-05-07 80117 142905 8\n",
"2 2 1 2019-05-28 80117 142905 8\n",
"3 2 1 2019-01-07 WSC117 121560 100\n",
"4 3 1 2019-01-02 80117 142905 10\n",
"5 3 1 2019-05-20 80117 142905 10\n",
"6 3 1 2019-01-21 WSC117 121560 200\n",
"7 3 1 2019-05-16 WSC117 121560 100\n",
"8 3 1 2019-06-07 WSC117 121560 100\n",
"9 3 1 2019-06-20 WSC117 121560 100\n",
"10 3 1 2019-08-30 WSC117 121560 100\n",
"11 4 21 2018-12-07 SB117 BR-20 1\n",
"12 5 1 2018-12-27 40099117 142905 10\n",
"13 5 1 2018-10-29 WSC117 121560 100\n",
"14 5 1 2018-11-09 WSC117 121560 100\n",
"15 5 1 2019-01-08 WSC117 121560 100\n",
"16 5 1 2019-07-25 WSC117 121560 100\n",
"17 5 1 2019-08-01 WSC117 121560 100\n",
"18 5 20 2018-12-14 XLG117 132327 7\n",
"19 5 20 2019-01-29 XLG117 132327 9\n",
"20 6 1 2019-01-05 RSK2117 135440 1\n",
"21 6 1 2018-10-31 WSC117 121560 200\n",
"22 6 1 2019-03-21 WSC117 121560 100\n",
"23 6 1 2019-04-15 WSC117 121560 100\n",
"24 6 1 2019-04-23 WSC117 121560 100\n",
"25 6 1 2019-06-19 WSC117 121560 200\n",
"26 6 1 2019-07-26 WSC117 121560 300\n",
"27 6 21 2019-04-26 XLG117 BR-20 3\n",
"28 6 21 2019-07-22 XLG117 BR-20 3\n",
"29 7 1 2019-02-26 WSC117 121560 100\n",
".. .. .. ... ... ... ...\n",
"91 21 20 2019-07-17 XLG117 132327 3\n",
"92 21 20 2019-08-12 XLG117 132327 2\n",
"93 22 1 2019-09-26 WSC117 BR-01 100\n",
"94 22 20 2018-10-30 SB117 999920 1\n",
"95 22 20 2018-11-06 SB117 999920 1\n",
"96 22 20 2018-11-06 SB117 999920 1\n",
"97 22 20 2019-08-16 SB117 999920 1\n",
"98 22 20 2019-08-16 SB117 999920 1\n",
"99 22 20 2019-05-29 XLG117 132327 3\n",
"100 22 20 2019-06-20 XLG117 132327 3\n",
"101 31 1 2018-11-09 AG4117 101620 12\n",
"102 31 1 2019-02-04 AG4117 101620 5\n",
"103 31 1 2019-04-01 AG4117 101620 10\n",
"104 31 1 2019-05-13 AG4117 101620 8\n",
"105 31 1 2019-06-17 AG4117 101620 12\n",
"106 31 1 2019-04-22 G3117 135510 1\n",
"107 32 1 2019-09-17 WSC117 121560 100\n",
"108 33 1 2018-12-10 K5117 135510 1\n",
"109 34 1 2018-11-05 WSC117 121560 100\n",
"110 52 51 2018-10-08 JN117 411380 24\n",
"111 52 51 2018-11-07 JN117 411380 24\n",
"112 52 51 2019-01-21 JN117 411380 48\n",
"113 52 51 2019-05-20 JN117 411380 48\n",
"114 53 51 2019-01-30 DRM9117 BR-45 30\n",
"115 53 51 2019-06-05 JN117 411380 12\n",
"116 53 52 2019-05-28 DRM9117 BR-51 13\n",
"117 2 1 2019-10-07 WSC117 121560 100\n",
"118 16 1 2019-10-07 K5117 135510 4\n",
"119 16 21 2019-10-07 SB117 BR-20 1\n",
"120 22 1 2019-10-01 WSC117 121560 100\n",
"\n",
"[121 rows x 6 columns]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t=t.loc[:,['TO', 'FR', 'DATE', 'PRODUCT', 'VENDOR', 'QTY']]\n",
"t"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
Unnamed: 0SCPRODUCTDESCRIPTIONABC_TYPEPRODUCT_VENDORACTUAL_COSTRECEIPT_PACK_QTYMIN_QOHMAX_QOH...QOH_ORDERSFORCST_QTY_CUR_MONFORCST_QTY_PREV_MONAVAILABLEABC_FACTORSAFETY_STOCK_FACTORLEAD_TIME_QUANTITY_FACTORSAFETY_STOCKLEAD_TIME_QUANTITYDATE
0121000117DMND WHL D.100 19MMGL COARSEM804291239.89905100...00000.00.00.00.00.02019-12-09 17:12:24
12851010117STAPS BRUSE HOVED Ø 9 KROMM12585122.45725100...00000.00.00.00.00.02019-12-09 17:12:24
25431020117PARALELSKÆRER 80 CM PKM85751577.97465100...00000.00.00.00.00.02019-12-09 17:12:24
317371031117DIAMANTBOR N 16 5 MMM85637049.69890100...00000.00.00.00.00.02019-12-09 17:12:24
4364829000117DMND WHL D.100 19MMGL COARSEM804291291.47850100...00000.00.00.00.00.02019-12-09 17:12:24
\n",
"

5 rows × 27 columns

\n",
"
"
],
"text/plain": [
" Unnamed: 0 SC PRODUCT DESCRIPTION ABC_TYPE \\\n",
"0 12 1 000117 DMND WHL D.100 19MMGL COARSE M \n",
"1 285 1 010117 STAPS BRUSE HOVED Ø 9 KROM M \n",
"2 543 1 020117 PARALELSKÆRER 80 CM PK M \n",
"3 1737 1 031117 DIAMANTBOR N 16 5 MM M \n",
"4 3648 29 000117 DMND WHL D.100 19MMGL COARSE M \n",
"\n",
" PRODUCT_VENDOR ACTUAL_COST RECEIPT_PACK_QTY MIN_QOH MAX_QOH ... \\\n",
"0 804291 239.89905 1 0 0 ... \n",
"1 125851 22.45725 1 0 0 ... \n",
"2 857515 77.97465 1 0 0 ... \n",
"3 856370 49.69890 1 0 0 ... \n",
"4 804291 291.47850 1 0 0 ... \n",
"\n",
" QOH_ORDERS FORCST_QTY_CUR_MON FORCST_QTY_PREV_MON AVAILABLE ABC_FACTOR \\\n",
"0 0 0 0 0 0.0 \n",
"1 0 0 0 0 0.0 \n",
"2 0 0 0 0 0.0 \n",
"3 0 0 0 0 0.0 \n",
"4 0 0 0 0 0.0 \n",
"\n",
" SAFETY_STOCK_FACTOR LEAD_TIME_QUANTITY_FACTOR SAFETY_STOCK \\\n",
"0 0.0 0.0 0.0 \n",
"1 0.0 0.0 0.0 \n",
"2 0.0 0.0 0.0 \n",
"3 0.0 0.0 0.0 \n",
"4 0.0 0.0 0.0 \n",
"\n",
" LEAD_TIME_QUANTITY DATE \n",
"0 0.0 2019-12-09 17:12:24 \n",
"1 0.0 2019-12-09 17:12:24 \n",
"2 0.0 2019-12-09 17:12:24 \n",
"3 0.0 2019-12-09 17:12:24 \n",
"4 0.0 2019-12-09 17:12:24 \n",
"\n",
"[5 rows x 27 columns]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sku.head()"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
Unnamed: 0Unnamed: 0.1Unnamed: 0.1.1Unnamed: 0.1.1.1PRODUCT_NOSHIP_SCCUSTOMER_NOINVOICE_ORDER_DATEQUANTITYSELL_PRICESALES_ORDERORDER_DATESHIP_VIASHIP_TO_ZIP
0000402348=\"3465117\"=\"01\"=\"0003054400\"=\"2019-07-09\"-39.3786=\"Q04696-1\"=\"2019-07-09\"=\"\"=\"97301\"
1111402349=\"3465117\"=\"01\"=\"0003054400\"=\"2019-06-18\"39.3786=\"Q04696-1\"=\"2019-06-18\"=\"UP\"=\"97301\"
2222402350=\"3465117\"=\"01\"=\"0003054400\"=\"2019-06-26\"39.3786=\"Q43939-1\"=\"2019-06-26\"=\"UP\"=\"97301\"
3333426960=\"40099117\"=\"01\"=\"0045332808\"=\"2018-10-23\"305.9136=\"E15677-1\"=\"2018-10-23\"=\"UP\"=\"90706\"
4444426961=\"40099117\"=\"01\"=\"0019056400\"=\"2019-05-23\"57.8771=\"N98545-1\"=\"2019-05-23\"=\"UP\"=\"93703\"
\n",
"
"
],
"text/plain": [
" Unnamed: 0 Unnamed: 0.1 Unnamed: 0.1.1 Unnamed: 0.1.1.1 PRODUCT_NO \\\n",
"0 0 0 0 402348 =\"3465117\" \n",
"1 1 1 1 402349 =\"3465117\" \n",
"2 2 2 2 402350 =\"3465117\" \n",
"3 3 3 3 426960 =\"40099117\" \n",
"4 4 4 4 426961 =\"40099117\" \n",
"\n",
" SHIP_SC CUSTOMER_NO INVOICE_ORDER_DATE QUANTITY SELL_PRICE \\\n",
"0 =\"01\" =\"0003054400\" =\"2019-07-09\" -3 9.3786 \n",
"1 =\"01\" =\"0003054400\" =\"2019-06-18\" 3 9.3786 \n",
"2 =\"01\" =\"0003054400\" =\"2019-06-26\" 3 9.3786 \n",
"3 =\"01\" =\"0045332808\" =\"2018-10-23\" 30 5.9136 \n",
"4 =\"01\" =\"0019056400\" =\"2019-05-23\" 5 7.8771 \n",
"\n",
" SALES_ORDER ORDER_DATE SHIP_VIA SHIP_TO_ZIP \n",
"0 =\"Q04696-1\" =\"2019-07-09\" =\"\" =\"97301\" \n",
"1 =\"Q04696-1\" =\"2019-06-18\" =\"UP\" =\"97301\" \n",
"2 =\"Q43939-1\" =\"2019-06-26\" =\"UP\" =\"97301\" \n",
"3 =\"E15677-1\" =\"2018-10-23\" =\"UP\" =\"90706\" \n",
"4 =\"N98545-1\" =\"2019-05-23\" =\"UP\" =\"93703\" "
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Wow, s does not look that good. We have the strings formatted with the weird =\"...\" framing. We need to kill those. Also, the SHIP_SC is a string with leading 0s, whereas everywhere else it's a number. Let's clean up that string framing first"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
"for col in ['PRODUCT_NO','SHIP_SC','CUSTOMER_NO','INVOICE_ORDER_DATE','SALES_ORDER','ORDER_DATE', 'SHIP_VIA', 'SHIP_TO_ZIP']:\n",
" s[col]=s[col].str[2:-1]"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
Unnamed: 0Unnamed: 0.1Unnamed: 0.1.1Unnamed: 0.1.1.1PRODUCT_NOSHIP_SCCUSTOMER_NOINVOICE_ORDER_DATEQUANTITYSELL_PRICESALES_ORDERORDER_DATESHIP_VIASHIP_TO_ZIP
000040234834651170100030544002019-07-09-39.3786Q04696-12019-07-0997301
111140234934651170100030544002019-06-1839.3786Q04696-12019-06-18UP97301
222240235034651170100030544002019-06-2639.3786Q43939-12019-06-26UP97301
3333426960400991170100453328082018-10-23305.9136E15677-12018-10-23UP90706
44</td>\n",
"
44426961400991170100190564002019-05-2357.8771N98545-12019-05-23UP93703
\n",
"
"
],
"text/plain": [
" Unnamed: 0 Unnamed: 0.1 Unnamed: 0.1.1 Unnamed: 0.1.1.1 PRODUCT_NO \\\n",
"0 0 0 0 402348 3465117 \n",
"1 1 1 1 402349 3465117 \n",
"2 2 2 2 402350 3465117 \n",
"3 3 3 3 426960 40099117 \n",
"4 4 4 4 426961 40099117 \n",
"\n",
" SHIP_SC CUSTOMER_NO INVOICE_ORDER_DATE QUANTITY SELL_PRICE SALES_ORDER \\\n",
"0 01 0003054400 2019-07-09 -3 9.3786 Q04696-1 \n",
"1 01 0003054400 2019-06-18 3 9.3786 Q04696-1 \n",
"2 01 0003054400 2019-06-26 3 9.3786 Q43939-1 \n",
"3 01 0045332808 2018-10-23 30 5.9136 E15677-1 \n",
"4 01 0019056400 2019-05-23 5 7.8771 N98545-1 \n",
"\n",
" ORDER_DATE SHIP_VIA SHIP_TO_ZIP \n",
"0 2019-07-09 97301 \n",
"1 2019-06-18 UP 97301 \n",
"2 2019-06-26 UP 97301 \n",
"3 2018-10-23 UP 90706 \n",
"4 2019-05-23 UP 93703 "
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Ok. Now let's convert the SHIP_SC from a string to a number, so we can link the other stuff"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"s.SHIP_SC=pd.to_numeric(s.SHIP_SC)"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
Unnamed: 0Unnamed: 0.1Unnamed: 0.1.1Unnamed: 0.1.1.1PRODUCT_NOSHIP_SCCUSTOMER_NOINVOICE_ORDER_DATEQUANTITYSELL_PRICESALES_ORDERORDER_DATESHIP_VIASHIP_TO_ZIP
00004023483465117100030544002019-07-09-39.3786Q04696-12019-07-0997301
11114023493465117100030544002019-06-1839.3786Q04696-12019-06-18UP97301
22224023503465117100030544002019-06-2639.3786Q43939-12019-06-26UP97301
333342696040099117100453328082018-10-23305.9136E15677-12018-10-23UP90706
444442696140099117100190564002019-05-2357.8771N98545-12019-05-23UP93703
\n",
"
"
],
"text/plain": [
" Unnamed: 0 Unnamed: 0.1 Unnamed: 0.1.1 Unnamed: 0.1.1.1 PRODUCT_NO \\\n",
"0 0 0 0 402348 3465117 \n",
"1 1 1 1 402349 3465117 \n",
"2 2 2 2 402350 3465117 \n",
"3 3 3 3 426960 40099117 \n",
"4 4 4 4 426961 40099117 \n",
"\n",
" SHIP_SC CUSTOMER_NO INVOICE_ORDER_DATE QUANTITY SELL_PRICE SALES_ORDER \\\n",
"0 1 0003054400 2019-07-09 -3 9.3786 Q04696-1 \n",
"1 1 0003054400 2019-06-18 3 9.3786 Q04696-1 \n",
"2 1 0003054400 2019-06-26 3 9.3786 Q43939-1 \n",
"3 1 0045332808 2018-10-23 30 5.9136 E15677-1 \n",
"4 1 0019056400 2019-05-23 5 7.8771 N98545-1 \n",
"\n",
" ORDER_DATE SHIP_VIA SHIP_TO_ZIP \n",
"0 2019-07-09 97301 \n",
"1 2019-06-18 UP 97301 \n",
"2 2019-06-26 UP 97301 \n",
"3 2018-10-23 UP 90706 \n",
"4 2019-05-23 UP 93703 "
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we should convert the dates to actual dates"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"s.INVOICE_ORDER_DATE=pd.to_datetime(s.INVOICE_ORDER_DATE)"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [],
"source": [
"s.ORDER_DATE=pd.to_datetime(s.ORDER_DATE)"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [],
"source": [
"t.DATE=pd.to_datetime(t.DATE)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And finally we ought to relabel some columns so that we can join things together. Look at the labels"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['Unnamed: 0', 'Unnamed: 0.1', 'Unnamed: 0.1.1', 'Unnamed: 0.1.1.1',\n",
" 'PRODUCT_NO', 'SHIP_SC', 'CUSTOMER_NO', 'INVOICE_ORDER_DATE',\n",
" 'QUANTITY', 'SELL_PRICE', 'SALES_ORDER', 'ORDER_DATE', 'SHIP_VIA',\n",
" 'SHIP_TO_ZIP'],\n",
" dtype='object')"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s.columns"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['TO', 'FR', 'DATE', 'PRODUCT', 'VENDOR', 'QTY'], dtype='object')"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t.columns"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['Unnamed: 0', 'SC', 'PRODUCT', 'DESCRIPTION', 'ABC_TYPE',\n",
" 'PRODUCT_VENDOR', 'ACTUAL_COST', 'RECEIPT_PACK_QTY', 'MIN_QOH',\n",
" 'MAX_QOH', 'ACMU', 'AMAD', 'LEAD_TIME', 'MIN_ORDER_QTY', 'EOQ', 'QOH',\n",
" 'ORDER_QTY', 'QOH_ORDERS', 'FORCST_QTY_CUR_MON', 'FORCST_QTY_PREV_MON',\n",
" 'AVAILABLE', 'ABC_FACTOR', 'SAFETY_STOCK_FACTOR',\n",
" 'LEAD_TIME_QUANTITY_FACTOR', 'SAFETY_STOCK', 'LEAD_TIME_QUANTITY',\n",
" 'DATE'],\n",
" dtype='object')"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sku.columns"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We need to change t.TO to t.SC and s.SHIP_SC to s.SC and s.PRODUCT_NO to s.PRODUCT"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [],
"source": [
"t.rename(columns={\"TO\": \"SC\"}, inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['SC', 'FR', 'DATE', 'PRODUCT', 'VENDOR', 'QTY'], dtype='object')"
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t.columns"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [],
"source": [
"s.rename(columns={\"SHIP_SC\": \"SC\"}, inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [],
"source": [
"s.rename(columns={\"PRODUCT_NO\": \"PRODUCT\"}, inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['Unnamed: 0', 'Unnamed: 0.1', 'Unnamed: 0.1.1', 'Unnamed: 0.1.1.1',\n",
" 'PRODUCT', 'SC', 'CUSTOMER_NO', 'INVOICE_ORDER_DATE', 'QUANTITY',\n",
" 'SELL_PRICE', 'SALES_ORDER', 'ORDER_DATE', 'SHIP_VIA', 'SHIP_TO_ZIP'],\n",
" dtype='object')"
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s.columns"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Phew, we are done, now we can answer our question. Our final result is a table by SKU with 3 entries: the total number transferred into SC 02 in June, the total sales in June and the current inventory. Let's do them one by one first"
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
QTY
SCPRODUCT
1400991172
28011716
38011710
WSC117100
7WSC117200
16XLG1171
22XLG1173
31AG41178
52JN11748
53DRM911713
\n",
"
"
],
"text/plain": [
" QTY\n",
"SC PRODUCT \n",
"1 40099117 2\n",
"2 80117 16\n",
"3 80117 10\n",
" WSC117 100\n",
"7 WSC117 200\n",
"16 XLG117 1\n",
"22 XLG117 3\n",
"31 AG4117 8\n",
"52 JN117 48\n",
"53 DRM9117 13"
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"transfers=t[ t.DATE.dt.month==5].groupby(['SC','PRODUCT']).agg({'QTY' : 'sum'})\n",
"transfers"
]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
QUANTITY
SCPRODUCT
1400991175
8011710
K51172
WSC117100
28011710
3WSC117100
7WSC117100
9WSC117100
11WSC117100
15XLG11717
20SB1172
XLG1173
31AG41179
33WSC117100
49QZSL1171
51JN11713
52JN11736
81QZS11788
QZSL11719
\n",
"
"
],
"text/plain": [
" QUANTITY\n",
"SC PRODUCT \n",
"1 40099117 5\n",
" 80117 10\n",
" K5117 2\n",
" WSC117 100\n",
"2 80117 10\n",
"3 WSC117 100\n",
"7 WSC117 100\n",
"9 WSC117 100\n",
"11 WSC117 100\n",
"15 XLG117 17\n",
"20 SB117 2\n",
" XLG117 3\n",
"31 AG4117 9\n",
"33 WSC117 100\n",
"49 QZSL117 1\n",
"51 JN117 13\n",
"52 JN117 36\n",
"81 QZS117 88\n",
" QZSL117 19"
]
},
"execution_count": 68,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sales=s[s.INVOICE_ORDER_DATE.dt.month==5].groupby(['SC','PRODUCT']).agg({'QUANTITY' : 'sum'})\n",
"sales"
]
},
{
"cell_type": "code",
"execution_count": 70,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTQOH
010001170
110101170
210201170
310311170
4290001170
510801170
6290101170
7290201170
811101170
9290311170
101834651170
1111301170
1218400991170
13290801170
141134651170
1511311170
1611400991171
1711351170
1818801170
1911801176
20292361170
2118AG41170
222934651170
2329400991170
2411AG41170
2512361170
2629801170
2712601170
2829941170
2929A401170
............
840960101170
841960201170
842960311170
843960801170
844961101170
845961301170
846961311170
847961351170
848962361170
849962601170
8509631D011170
8519634651170
85296400991170
8539643PB231170
8549644PB311170
85596801170
85696931170
85796941170
85896A401170
85996AG41170
86096CP9981170
86196G31170
86296JN1170
86396K51170
86496QZS1170
86596QZSL1170
86696R5051170
86796RSK21170
86896RSM21170
86996WSC1170
\n",
"

870 rows × 3 columns

\n",
"
"
],
"text/plain": [
" SC PRODUCT QOH\n",
"0 1 000117 0\n",
"1 1 010117 0\n",
"2 1 020117 0\n",
"3 1 031117 0\n",
"4 29 000117 0\n",
"5 1 080117 0\n",
"6 29 010117 0\n",
"7 29 020117 0\n",
"8 1 110117 0\n",
"9 29 031117 0\n",
"10 18 3465117 0\n",
"11 1 130117 0\n",
"12 18 40099117 0\n",
"13 29 080117 0\n",
"14 11 3465117 0\n",
"15 1 131117 0\n",
"16 11 40099117 1\n",
"17 1 135117 0\n",
"18 18 80117 0\n",
"19 11 80117 6\n",
"20 29 236117 0\n",
"21 18 AG4117 0\n",
"22 29 3465117 0\n",
"23 29 40099117 0\n",
"24 11 AG4117 0\n",
"25 1 236117 0\n",
"26 29 80117 0\n",
"27 1 260117 0\n",
"28 29 94117 0\n",
"29 29 A40117 0\n",
".. .. ... ...\n",
"840 96 010117 0\n",
"841 96 020117 0\n",
"842 96 031117 0\n",
"843 96 080117 0\n",
"844 96 110117 0\n",
"845 96 130117 0\n",
"846 96 131117 0\n",
"847 96 135117 0\n",
"848 96 236117 0\n",
"849 96 260117 0\n",
"850 96 31D01117 0\n",
"851 96 3465117 0\n",
"852 96 40099117 0\n",
"853 96 43PB23117 0\n",
"854 96 44PB31117 0\n",
"855 96 80117 0\n",
"856 96 93117 0\n",
"857 96 94117 0\n",
"858 96 A40117 0\n",
"859 96 AG4117 0\n",
"860 96 CP998117 0\n",
"861 96 G3117 0\n",
"862 96 JN117 0\n",
"863 96 K5117 0\n",
"864 96 QZS117 0\n",
"865 96 QZSL117 0\n",
"866 96 R505117 0\n",
"867 96 RSK2117 0\n",
"868 96 RSM2117 0\n",
"869 96 WSC117 0\n",
"\n",
"[870 rows x 3 columns]"
]
},
"execution_count": 70,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"inventory=sku.loc[:,['SC','PRODUCT','QOH']]\n",
"inventory"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we need to join them together, first we should reset the indices, so that we can do the standard merge"
]
},
{
"cell_type": "code",
"execution_count": 72,
"metadata": {},
"outputs": [],
"source": [
"sales.reset_index(inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {},
"outputs": [],
"source": [
"transfers.reset_index(inplace=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And now we join them together in one line on both SC and PRODUCT"
]
},
{
"cell_type": "code",
"execution_count": 78,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTQUANTITYQTYQOH
014009911752.0213
118011710NaN954
21K51172NaN6
31WSC117100NaN1300
42801171016.00
53WSC117100100.0200
67WSC117100200.0200
79WSC117100NaN300
811WSC117100NaN300
915XLG11717NaN0
1020SB1172NaN49
1120XLG1173NaN0
1231AG411798.08
1333WSC117100NaN100
1449QZSL1171NaN0
1551JN11713NaN122
1652JN1173648.023
1781QZS11788NaN108
1881QZSL11719NaN-3
\n",
"
"
],
"text/plain": [
" SC PRODUCT QUANTITY QTY QOH\n",
"0 1 40099117 5 2.0 213\n",
"1 1 80117 10 NaN 954\n",
"2 1 K5117 2 NaN 6\n",
"3 1 WSC117 100 NaN 1300\n",
"4 2 80117 10 16.0 0\n",
"5 3 WSC117 100 100.0 200\n",
"6 7 WSC117 100 200.0 200\n",
"7 9 WSC117 100 NaN 300\n",
"8 11 WSC117 100 NaN 300\n",
"9 15 XLG117 17 NaN 0\n",
"10 20 SB117 2 NaN 49\n",
"11 20 XLG117 3 NaN 0\n",
"12 31 AG4117 9 8.0 8\n",
"13 33 WSC117 100 NaN 100\n",
"14 49 QZSL117 1 NaN 0\n",
"15 51 JN117 13 NaN 122\n",
"16 52 JN117 36 48.0 23\n",
"17 81 QZS117 88 NaN 108\n",
"18 81 QZSL117 19 NaN -3"
]
},
"execution_count": 78,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sales.merge(transfers, on=['SC','PRODUCT'], how='left').merge(inventory, on=['SC','PRODUCT'], how='left')\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
homework-data-cleaning-files-ugf44p3y/Homework - Data cleaning - files/.ipynb_checkpoints/Data cleaning Walker-checkpoint.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data Cleaning HW\n",
"\n",
"## Class: MAS 638\n",
"## Section: 5:45 pm Tuesday/Thursday\n",
"\n",
"## Name: Camille Walker"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Import"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import sys, pandas as pd, matplotlib as mpl, matplotlib.pyplot as plt, numpy as np\n",
"from IPython.display import Image"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Obtaining data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Read in CSVs"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"sales=pd.read_csv('sales test.csv')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"skus=pd.read_csv('SKU master test.csv')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Read in text file"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"transfers=pd.read_fwf('transfers test.txt')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Cleaning data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's look at our data sets"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
Unnamed: 0Unnamed: 0.1Unnamed: 0.1.1Unnamed: 0.1.1.1PRODUCT_NOSHIP_SCCUSTOMER_NOINVOICE_ORDER_DATEQUANTITYSELL_PRICESALES_ORDERORDER_DATESHIP_VIASHIP_TO_ZIP
0000402348=\"3465117\"=\"01\"=\"0003054400\"=\"2019-07-09\"-39.3786=\"Q04696-1\"=\"2019-07-09\"=\"\"=\"97301\"
1111402349=\"3465117\"=\"01\"=\"0003054400\"=\"2019-06-18\"39.3786=\"Q04696-1\"=\"2019-06-18\"=\"UP\"=\"97301\"
2222402350=\"3465117\"=\"01\"=\"0003054400\"=\"2019-06-26\"39.3786=\"Q43939-1\"=\"2019-06-26\"=\"UP\"=\"97301\"
3333426960=\"40099117\"=\"01\"=\"0045332808\"=\"2018-10-23\"305.9136=\"E15677-1\"=\"2018-10-23\"=\"UP\"=\"90706\"
4444426961=\"40099117\"=\"01\"=\"0019056400\"=\"2019-05-23\"57.8771=\"N98545-1\"=\"2019-05-23\"=\"UP\"=\"93703\"
5555426962=\"40099117\"=\"03\"=\"0076031754\"=\"2019-02-26\"67.8771=\"K11970-1\"=\"2019-02-25\"=\"UP\"=\"63132\"
6666426963=\"40099117\"=\"05\"=\"0100043768\"=\"2019-01-02\"105.9136=\"G56448-1\"=\"2018-12-19\"=\"WC\"=\"30046\"
7777426964=\"40099117\"=\"08\"=\"0009819031\"=\"2019-02-19\"206.9069=\"J74383-1\"=\"2019-02-15\"=\"WC\"=\"32824\"
8888450535=\"4700000117\"=\"17\"=\"0015925400\"=\"2018-10-09\"6194.1555=\"D52294-1\"=\"2018-10-09\"=\"UP\"=\"17404\"
9999450536=\"4700000117\"=\"17\"=\"0027378908\"=\"2018-10-16\"2194.1555=\"D85073-1\"=\"2018-10-16\"=\"UP\"=\"40505\"
10101010450537=\"4700000117\"=\"17\"=\"0042122008\"=\"2018-11-08\"2194.1555=\"E41684-1\"=\"2018-10-29\"=\"UP\"=\"91733\"
11111111450538=\"4700000117\"=\"17\"=\"0049379847\"=\"2018-12-07\"2194.1555=\"G13903-1\"=\"2018-12-07\"=\"UP\"=\"23508\"
12121212450539=\"4700000117\"=\"17\"=\"0074975408\"=\"2019-01-08\"1298.5213=\"G93530-1\"=\"2019-01-03\"=\"UP\"=\"11101\"
13131313603825=\"80117\"=\"01\"=\"0023295908\"=\"2019-09-18\"53.9501=\"T78302-2\"=\"2019-09-17\"=\"WC\"=\"91605\"
14141414603826=\"80117\"=\"01\"=\"0MFG38THST\"=\"2018-09-24\"61.2474=\"C71103-1\"=\"2018-09-20\"=\"CR\"=\"90058\"
15151515603827=\"80117\"=\"01\"=\"0057826514\"=\"2018-10-16\"203.1647=\"D81917-1\"=\"2018-10-16\"=\"WC\"=\"91201\"
16161616603828=\"80117\"=\"01\"=\"0100185113\"=\"2018-11-07\"503.1647=\"E80630-1\"=\"2018-11-06\"=\"UP\"=\"91343\"
17171717603829=\"80117\"=\"01\"=\"0015421866\"=\"2018-11-29\"123.1647=\"F70214-1\"=\"2018-11-28\"=\"WC\"=\"91020\"
18181818603830=\"80117\"=\"01\"=\"0015421866\"=\"2019-01-25\"203.4419=\"H85704-1\"=\"2019-01-24\"=\"WC\"=\"91020\"
19191919603831=\"80117\"=\"01\"=\"0MFG55THST\"=\"2019-04-15\"201.3629=\"M25770-1\"=\"2019-04-15\"=\"CR\"=\"90058\"
20202020603832=\"80117\"=\"01\"=\"0MFG38THST\"=\"2019-04-24\"61.3629=\"M59961-1\"=\"2019-04-23\"=\"CR\"=\"90058\"
21212121603833=\"80117\"=\"01\"=\"0100181710\"=\"2019-05-21\"103.4419=\"N86010-1\"=\"2019-05-21\"=\"WC\"=\"91311\"
22222222603834=\"80117\"=\"01\"=\"0100181710\"=\"2019-08-07\"203.9501=\"S10680-1\"=\"2019-08-07\"=\"WC\"=\"91311\"
23232323603835=\"80117\"=\"01\"=\"0100181710\"=\"2019-08-21\"203.9501=\"S66721-1\"=\"2019-08-20\"=\"WC\"=\"91311\"
24242424603836=\"80117\"=\"01\"=\"0100181710\"=\"2019-08-29\"103.9501=\"T02471-1\"=\"2019-08-28\"=\"WC\"=\"91311\"
25252525603837=\"80117\"=\"01\"=\"0023295908\"=\"2019-09-18\"253.9501=\"T78302-1\"=\"2019-09-17\"=\"WC\"=\"91605\"
26262626603838=\"80117\"=\"01\"=\"0MFG55THST\"=\"2019-09-16\"201.5477=\"T65479-1\"=\"2019-09-13\"=\"CR\"=\"90058\"
27272727603839=\"80117\"=\"02\"=\"0100173097\"=\"2019-09-26\"153.9501=\"T87337-2\"=\"2019-09-18\"=\"WC\"=\"75063\"
28282828603840=\"80117\"=\"02\"=\"0073529308\"=\"2019-04-04\"103.4419=\"L82998-1\"=\"2019-04-04\"=\"UP\"=\"72023\"
29292929603841=\"80117\"=\"02\"=\"0100206926\"=\"2019-05-22\"103.4419=\"N92040-1\"=\"2019-05-22\"=\"WC\"=\"76120\"
.............................................
8688688688684913084=\"WSC117\"=\"33\"=\"CN07586650\"=\"2019-05-09\"1000.7392=\"N26168-1\"=\"2019-05-07\"=\"WC\"=\"K9J5T7\"
8698698698694913085=\"WSC117\"=\"34\"=\"CN10215702\"=\"2018-10-12\"1001.0164=\"D53325-1\"=\"2018-10-09\"=\"UP\"=\"T4N2R2\"
8708708708704913086=\"WSC117\"=\"34\"=\"CN01952700\"=\"2019-07-23\"1001.1088=\"Q71570-1\"=\"2019-07-03\"=\"FC\"=\"T1L1A8\"
8718718718714913087=\"WSC117\"=\"51\"=\"AU00273269\"=\"2018-10-10\"1000.9240=\"C66186-1\"=\"2018-09-11\"=\"1F\"=\"2541\"
8728728728724990969=\"XLG117\"=\"04\"=\"0044304300\"=\"2018-10-25\"3175.4445=\"Z28909-1\"=\"2018-08-20\"=\"MV\"=\"95826\"
8738738738734990970=\"XLG117\"=\"05\"=\"0100190172\"=\"2018-09-20\"6172.0026=\"Y06897-1\"=\"2018-07-24\"=\"WC\"=\"31716\"
8748748748744990971=\"XLG117\"=\"05\"=\"0100190172\"=\"2019-02-08\"16176.3223=\"F94219-1\"=\"2018-12-04\"=\"WC\"=\"31716\"
8758758758754990972=\"XLG117\"=\"06\"=\"0015468300\"=\"2018-12-05\"3175.4445=\"E78660-1\"=\"2018-08-08\"=\"DK\"=\"08724\"
8768768768764990973=\"XLG117\"=\"06\"=\"0075258558\"=\"2019-08-08\"3165.8118=\"P70427-1\"=\"2019-04-04\"=\"DK\"=\"10553\"
8778778778774990974=\"XLG117\"=\"15\"=\"0010914144\"=\"2019-08-28\"-4206.5140=\"L90898-1\"=\"2019-08-28\"=\"\"=\"77304\"
8788788788784990975=\"XLG117\"=\"15\"=\"0010914144\"=\"2019-05-16\"17206.5140=\"L90898-1\"=\"2019-03-19\"=\"WC\"=\"77304\"
8798798798794990976=\"XLG117\"=\"15\"=\"0006955968\"=\"2019-09-19\"5206.5140=\"T88186-1\"=\"2019-09-11\"=\"UP\"=\"27215\"
8808808808804990977=\"XLG117\"=\"16\"=\"0100085798\"=\"2018-11-30\"4175.4445=\"C94523-1\"=\"2018-09-26\"=\"AV\"=\"33166\"
8818818818814990978=\"XLG117\"=\"16\"=\"SHORTAGE16\"=\"2019-01-07\"1190.9215=\"G64989-1\"=\"2018-12-20\"=\"UP\"=\"33166\"
8828828828824990979=\"XLG117\"=\"16\"=\"0066620056\"=\"2019-02-27\"1165.1419=\"H91017-1\"=\"2019-01-25\"=\"WC\"=\"33313\"
8838838838834990980=\"XLG117\"=\"16\"=\"0066620056\"=\"2019-03-19\"5165.1419=\"H91017-2\"=\"2019-01-25\"=\"WC\"=\"33313\"
8848848848844990981=\"XLG117\"=\"16\"=\"0022485553\"=\"2019-07-26\"1206.5140=\"M76178-1\"=\"2019-04-25\"=\"AV\"=\"33178\"
8858858858854990982=\"XLG117\"=\"16\"=\"0066300267\"=\"2019-09-06\"2174.7515=\"S13808-1\"=\"2019-08-07\"=\"AE\"=\"00926\"
8868868868864990983=\"XLG117\"=\"20\"=\"0073089500\"=\"2018-09-06\"4137.9994=\"Z19481-2\"=\"2018-05-11\"=\"7U\"=\"77032\"
8878878878874990984=\"XLG117\"=\"20\"=\"0034044000\"=\"2019-09-27\"4161.4690=\"T63596-3\"=\"2019-09-13\"=\"WC\"=\"75040\"
8888888888884990985=\"XLG117\"=\"20\"=\"0038447352\"=\"2018-11-02\"-2176.3223=\"D41099-1\"=\"2018-11-02\"=\"\"=\"78550\"
8898898898894990986=\"XLG117\"=\"20\"=\"0038447352\"=\"2018-10-18\"2176.3223=\"D41099-1\"=\"2018-10-05\"=\"UP\"=\"78550\"
8908908908904990987=\"XLG117\"=\"20\"=\"0010914144\"=\"2018-10-30\"4207.2994=\"C32281-1\"=\"2018-09-12\"=\"WC\"=\"77304\"
8918918918914990988=\"XLG117\"=\"20\"=\"0100276709\"=\"2018-12-05\"2176.3223=\"F49515-1\"=\"2018-11-21\"=\"7U\"=\"78577\"
8928928928924990989=\"XLG117\"=\"20\"=\"0038447352\"=\"2018-12-07\"1176.3223=\"G14074-1\"=\"2018-12-07\"=\"UP\"=\"78550\"
8938938938934990990=\"XLG117\"=\"20\"=\"0034044000\"=\"2019-02-01\"5181.1271=\"H27996-1\"=\"2018-12-28\"=\"WC\"=\"75040\"
8948948948944990991=\"XLG117\"=\"20\"=\"0100243230\"=\"2019-05-03\"3160.2678=\"L78308-1\"=\"2019-04-03\"=\"WC\"=\"75057\"
8958958958954990992=\"XLG117\"=\"20\"=\"0015468300\"=\"2019-06-25\"1174.7515=\"Q34617-1\"=\"2019-06-25\"=\"UP\"=\"08724\"
8968968968964990993=\"XLG117\"=\"22\"=\"0056754055\"=\"2018-09-11\"2175.4445=\"C06890-1\"=\"2018-08-27\"=\"CN\"=\"29407\"
8978978978974990994=\"XLG117\"=\"22\"=\"0006955968\"=\"2019-08-02\"6155.2551=\"N95047-1\"=\"2019-05-15\"=\"CN\"=\"27215\"
\n",
"

898 rows × 14 columns

\n",
"
"
],
"text/plain": [
" Unnamed: 0 Unnamed: 0.1 Unnamed: 0.1.1 Unnamed: 0.1.1.1 \\\n",
"0 0 0 0 402348 \n",
"1 1 1 1 402349 \n",
"2 2 2 2 402350 \n",
"3 3 3 3 426960 \n",
"4 4 4 4 426961 \n",
"5 5 5 5 426962 \n",
"6 6 6 6 426963 \n",
"7 7 7 7 426964 \n",
"8 8 8 8 450535 \n",
"9 9 9 9 450536 \n",
"10 10 10 10 450537 \n",
"11 11 11 11 450538 \n",
"12 12 12 12 450539 \n",
"13 13 13 13 603825 \n",
"14 14 14 14 603826 \n",
"15 15 15 15 603827 \n",
"16 16 16 16 603828 \n",
"17 17 17 17 603829 \n",
"18 18 18 18 603830 \n",
"19 19 19 19 603831 \n",
"20 20 20 20 603832 \n",
"21 21 21 21 603833 \n",
"22 22 22 22 603834 \n",
"23 23 23 23 603835 \n",
"24 24 24 24 603836 \n",
"25 25 25 25 603837 \n",
"26 26 26 26 603838 \n",
"27 27 27 27 603839 \n",
"28 28 28 28 603840 \n",
"29 29 29 29 603841 \n",
".. ... ... ... ... \n",
"868 868 868 868 4913084 \n",
"869 869 869 869 4913085 \n",
"870 870 870 870 4913086 \n",
"871 871 871 871 4913087 \n",
"872 872 872 872 4990969 \n",
"873 873 873 873 4990970 \n",
"874 874 874 874 4990971 \n",
"875 875 875 875 4990972 \n",
"876 876 876 876 4990973 \n",
"877 877 877 877 4990974 \n",
"878 878 878 878 4990975 \n",
"879 879 879 879 4990976 \n",
"880 880 880 880 4990977 \n",
"881 881 881 881 4990978 \n",
"882 882 882 882 4990979 \n",
"883 883 883 883 4990980 \n",
"884 884 884 884 4990981 \n",
"885 885 885 885 4990982 \n",
"886 886 886 886 4990983 \n",
"887 887 887 887 4990984 \n",
"888 888 888 888 4990985 \n",
"889 889 889 889 4990986 \n",
"890 890 890 890 4990987 \n",
"891 891 891 891 4990988 \n",
"892 892 892 892 4990989 \n",
"893 893 893 893 4990990 \n",
"894 894 894 894 4990991 \n",
"895 895 895 895 4990992 \n",
"896 896 896 896 4990993 \n",
"897 897 897 897 4990994 \n",
"\n",
" PRODUCT_NO SHIP_SC CUSTOMER_NO INVOICE_ORDER_DATE QUANTITY \\\n",
"0 =\"3465117\" =\"01\" =\"0003054400\" =\"2019-07-09\" -3 \n",
"1 =\"3465117\" =\"01\" =\"0003054400\" =\"2019-06-18\" 3 \n",
"2 =\"3465117\" =\"01\" =\"0003054400\" =\"2019-06-26\" 3 \n",
"3 =\"40099117\" =\"01\" =\"0045332808\" =\"2018-10-23\" 30 \n",
"4 =\"40099117\" =\"01\" =\"0019056400\" =\"2019-05-23\" 5 \n",
"5 =\"40099117\" =\"03\" =\"0076031754\" =\"2019-02-26\" 6 \n",
"6 =\"40099117\" =\"05\" =\"0100043768\" =\"2019-01-02\" 10 \n",
"7 =\"40099117\" =\"08\" =\"0009819031\" =\"2019-02-19\" 20 \n",
"8 =\"4700000117\" =\"17\" =\"0015925400\" =\"2018-10-09\" 6 \n",
"9 =\"4700000117\" =\"17\" =\"0027378908\" =\"2018-10-16\" 2 \n",
"10 =\"4700000117\" =\"17\" =\"0042122008\" =\"2018-11-08\" 2 \n",
"11 =\"4700000117\" =\"17\" =\"0049379847\" =\"2018-12-07\" 2 \n",
"12 =\"4700000117\" =\"17\" =\"0074975408\" =\"2019-01-08\" 1 \n",
"13 =\"80117\" =\"01\" =\"0023295908\" =\"2019-09-18\" 5 \n",
"14 =\"80117\" =\"01\" =\"0MFG38THST\" =\"2018-09-24\" 6 \n",
"15 =\"80117\" =\"01\" =\"0057826514\" =\"2018-10-16\" 20 \n",
"16 =\"80117\" =\"01\" =\"0100185113\" =\"2018-11-07\" 50 \n",
"17 =\"80117\" =\"01\" =\"0015421866\" =\"2018-11-29\" 12 \n",
"18 =\"80117\" =\"01\" =\"0015421866\" =\"2019-01-25\" 20 \n",
"19 =\"80117\" =\"01\" =\"0MFG55THST\" =\"2019-04-15\" 20 \n",
"20 =\"80117\" =\"01\" =\"0MFG38THST\" =\"2019-04-24\" 6 \n",
"21 =\"80117\" =\"01\" =\"0100181710\" =\"2019-05-21\" 10 \n",
"22 =\"80117\" =\"01\" =\"0100181710\" =\"2019-08-07\" 20 \n",
"23 =\"80117\" =\"01\" =\"0100181710\" =\"2019-08-21\" 20 \n",
"24 =\"80117\" =\"01\" =\"0100181710\" =\"2019-08-29\" 10 \n",
"25 =\"80117\" =\"01\" =\"0023295908\" =\"2019-09-18\" 25 \n",
"26 =\"80117\" =\"01\" =\"0MFG55THST\" =\"2019-09-16\" 20 \n",
"27 =\"80117\" =\"02\" =\"0100173097\" =\"2019-09-26\" 15 \n",
"28 =\"80117\" =\"02\" =\"0073529308\" =\"2019-04-04\" 10 \n",
"29 =\"80117\" =\"02\" =\"0100206926\" =\"2019-05-22\" 10 \n",
".. ... ... ... ... ... \n",
"868 =\"WSC117\" =\"33\" =\"CN07586650\" =\"2019-05-09\" 100 \n",
"869 =\"WSC117\" =\"34\" =\"CN10215702\" =\"2018-10-12\" 100 \n",
"870 =\"WSC117\" =\"34\" =\"CN01952700\" =\"2019-07-23\" 100 \n",
"871 =\"WSC117\" =\"51\" =\"AU00273269\" =\"2018-10-10\" 100 \n",
"872 =\"XLG117\" =\"04\" =\"0044304300\" =\"2018-10-25\" 3 \n",
"873 =\"XLG117\" =\"05\" =\"0100190172\" =\"2018-09-20\" 6 \n",
"874 =\"XLG117\" =\"05\" =\"0100190172\" =\"2019-02-08\" 16 \n",
"875 =\"XLG117\" =\"06\" =\"0015468300\" =\"2018-12-05\" 3 \n",
"876 =\"XLG117\" =\"06\" =\"0075258558\" =\"2019-08-08\" 3 \n",
"877 =\"XLG117\" =\"15\" =\"0010914144\" =\"2019-08-28\" -4 \n",
"878 =\"XLG117\" =\"15\" =\"0010914144\" =\"2019-05-16\" 17 \n",
"879 =\"XLG117\" =\"15\" =\"0006955968\" =\"2019-09-19\" 5 \n",
"880 =\"XLG117\" =\"16\" =\"0100085798\" =\"2018-11-30\" 4 \n",
"881 =\"XLG117\" =\"16\" =\"SHORTAGE16\" =\"2019-01-07\" 1 \n",
"882 =\"XLG117\" =\"16\" =\"0066620056\" =\"2019-02-27\" 1 \n",
"883 =\"XLG117\" =\"16\" =\"0066620056\" =\"2019-03-19\" 5 \n",
"884 =\"XLG117\" =\"16\" =\"0022485553\" =\"2019-07-26\" 1 \n",
"885 =\"XLG117\" =\"16\" =\"0066300267\" =\"2019-09-06\" 2 \n",
"886 =\"XLG117\" =\"20\" =\"0073089500\" =\"2018-09-06\" 4 \n",
"887 =\"XLG117\" =\"20\" =\"0034044000\" =\"2019-09-27\" 4 \n",
"888 =\"XLG117\" =\"20\" =\"0038447352\" =\"2018-11-02\" -2 \n",
"889 =\"XLG117\" =\"20\" =\"0038447352\" =\"2018-10-18\" 2 \n",
"890 =\"XLG117\" =\"20\" =\"0010914144\" =\"2018-10-30\" 4 \n",
"891 =\"XLG117\" =\"20\" =\"0100276709\" =\"2018-12-05\" 2 \n",
"892 =\"XLG117\" =\"20\" =\"0038447352\" =\"2018-12-07\" 1 \n",
"893 =\"XLG117\" =\"20\" =\"0034044000\" =\"2019-02-01\" 5 \n",
"894 =\"XLG117\" =\"20\" =\"0100243230\" =\"2019-05-03\" 3 \n",
"895 =\"XLG117\" =\"20\" =\"0015468300\" =\"2019-06-25\" 1 \n",
"896 =\"XLG117\" =\"22\" =\"0056754055\" =\"2018-09-11\" 2 \n",
"897 =\"XLG117\" =\"22\" =\"0006955968\" =\"2019-08-02\" 6 \n",
"\n",
" SELL_PRICE SALES_ORDER ORDER_DATE SHIP_VIA SHIP_TO_ZIP \n",
"0 9.3786 =\"Q04696-1\" =\"2019-07-09\" =\"\" =\"97301\" \n",
"1 9.3786 =\"Q04696-1\" =\"2019-06-18\" =\"UP\" =\"97301\" \n",
"2 9.3786 =\"Q43939-1\" =\"2019-06-26\" =\"UP\" =\"97301\" \n",
"3 5.9136 =\"E15677-1\" =\"2018-10-23\" =\"UP\" =\"90706\" \n",
"4 7.8771 =\"N98545-1\" =\"2019-05-23\" =\"UP\" =\"93703\" \n",
"5 7.8771 =\"K11970-1\" =\"2019-02-25\" =\"UP\" =\"63132\" \n",
"6 5.9136 =\"G56448-1\" =\"2018-12-19\" =\"WC\" =\"30046\" \n",
"7 6.9069 =\"J74383-1\" =\"2019-02-15\" =\"WC\" =\"32824\" \n",
"8 194.1555 =\"D52294-1\" =\"2018-10-09\" =\"UP\" =\"17404\" \n",
"9 194.1555 =\"D85073-1\" =\"2018-10-16\" =\"UP\" =\"40505\" \n",
"10 194.1555 =\"E41684-1\" =\"2018-10-29\" =\"UP\" =\"91733\" \n",
"11 194.1555 =\"G13903-1\" =\"2018-12-07\" =\"UP\" =\"23508\" \n",
"12 298.5213 =\"G93530-1\" =\"2019-01-03\" =\"UP\" =\"11101\" \n",
"13 3.9501 =\"T78302-2\" =\"2019-09-17\" =\"WC\" =\"91605\" \n",
"14 1.2474 =\"C71103-1\" =\"2018-09-20\" =\"CR\" =\"90058\" \n",
"15 3.1647 =\"D81917-1\" =\"2018-10-16\" =\"WC\" =\"91201\" \n",
"16 3.1647 =\"E80630-1\" =\"2018-11-06\" =\"UP\" =\"91343\" \n",
"17 3.1647 =\"F70214-1\" =\"2018-11-28\" =\"WC\" =\"91020\" \n",
"18 3.4419 =\"H85704-1\" =\"2019-01-24\" =\"WC\" =\"91020\" \n",
"19 1.3629 =\"M25770-1\" =\"2019-04-15\" =\"CR\" =\"90058\" \n",
"20 1.3629 =\"M59961-1\" =\"2019-04-23\" =\"CR\" =\"90058\" \n",
"21 3.4419 =\"N86010-1\" =\"2019-05-21\" =\"WC\" =\"91311\" \n",
"22 3.9501 =\"S10680-1\" =\"2019-08-07\" =\"WC\" =\"91311\" \n",
"23 3.9501 =\"S66721-1\" =\"2019-08-20\" =\"WC\" =\"91311\" \n",
"24 3.9501 =\"T02471-1\" =\"2019-08-28\" =\"WC\" =\"91311\" \n",
"25 3.9501 =\"T78302-1\" =\"2019-09-17\" =\"WC\" =\"91605\" \n",
"26 1.5477 =\"T65479-1\" =\"2019-09-13\" =\"CR\" =\"90058\" \n",
"27 3.9501 =\"T87337-2\" =\"2019-09-18\" =\"WC\" =\"75063\" \n",
"28 3.4419 =\"L82998-1\" =\"2019-04-04\" =\"UP\" =\"72023\" \n",
"29 3.4419 =\"N92040-1\" =\"2019-05-22\" =\"WC\" =\"76120\" \n",
".. ... ... ... ... ... \n",
"868 0.7392 =\"N26168-1\" =\"2019-05-07\" =\"WC\" =\"K9J5T7\" \n",
"869 1.0164 =\"D53325-1\" =\"2018-10-09\" =\"UP\" =\"T4N2R2\" \n",
"870 1.1088 =\"Q71570-1\" =\"2019-07-03\" =\"FC\" =\"T1L1A8\" \n",
"871 0.9240 =\"C66186-1\" =\"2018-09-11\" =\"1F\" =\"2541\" \n",
"872 175.4445 =\"Z28909-1\" =\"2018-08-20\" =\"MV\" =\"95826\" \n",
"873 172.0026 =\"Y06897-1\" =\"2018-07-24\" =\"WC\" =\"31716\" \n",
"874 176.3223 =\"F94219-1\" =\"2018-12-04\" =\"WC\" =\"31716\" \n",
"875 175.4445 =\"E78660-1\" =\"2018-08-08\" =\"DK\" =\"08724\" \n",
"876 165.8118 =\"P70427-1\" =\"2019-04-04\" =\"DK\" =\"10553\" \n",
"877 206.5140 =\"L90898-1\" =\"2019-08-28\" =\"\" =\"77304\" \n",
"878 206.5140 =\"L90898-1\" =\"2019-03-19\" =\"WC\" =\"77304\" \n",
"879 206.5140 =\"T88186-1\" =\"2019-09-11\" =\"UP\" =\"27215\" \n",
"880 175.4445 =\"C94523-1\" =\"2018-09-26\" =\"AV\" =\"33166\" \n",
"881 190.9215 =\"G64989-1\" =\"2018-12-20\" =\"UP\" =\"33166\" \n",
"882 165.1419 =\"H91017-1\" =\"2019-01-25\" =\"WC\" =\"33313\" \n",
"883 165.1419 =\"H91017-2\" =\"2019-01-25\" =\"WC\" =\"33313\" \n",
"884 206.5140 =\"M76178-1\" =\"2019-04-25\" =\"AV\" =\"33178\" \n",
"885 174.7515 =\"S13808-1\" =\"2019-08-07\" =\"AE\" =\"00926\" \n",
"886 137.9994 =\"Z19481-2\" =\"2018-05-11\" =\"7U\" =\"77032\" \n",
"887 161.4690 =\"T63596-3\" =\"2019-09-13\" =\"WC\" =\"75040\" \n",
"888 176.3223 =\"D41099-1\" =\"2018-11-02\" =\"\" =\"78550\" \n",
"889 176.3223 =\"D41099-1\" =\"2018-10-05\" =\"UP\" =\"78550\" \n",
"890 207.2994 =\"C32281-1\" =\"2018-09-12\" =\"WC\" =\"77304\" \n",
"891 176.3223 =\"F49515-1\" =\"2018-11-21\" =\"7U\" =\"78577\" \n",
"892 176.3223 =\"G14074-1\" =\"2018-12-07\" =\"UP\" =\"78550\" \n",
"893 181.1271 =\"H27996-1\" =\"2018-12-28\" =\"WC\" =\"75040\" \n",
"894 160.2678 =\"L78308-1\" =\"2019-04-03\" =\"WC\" =\"75057\" \n",
"895 174.7515 =\"Q34617-1\" =\"2019-06-25\" =\"UP\" =\"08724\" \n",
"896 175.4445 =\"C06890-1\" =\"2018-08-27\" =\"CN\" =\"29407\" \n",
"897 155.2551 =\"N95047-1\" =\"2019-05-15\" =\"CN\" =\"27215\" \n",
"\n",
"[898 rows x 14 columns]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sales"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Drop Columns and Format data"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"sales.drop(['Unnamed: 0','Unnamed: 0.1','Unnamed: 0.1.1','Unnamed: 0.1.1.1'],axis=1,inplace=True)\n",
"sales.drop(['CUSTOMER_NO','SELL_PRICE','SALES_ORDER','ORDER_DATE','SHIP_VIA','SHIP_TO_ZIP'],axis=1,inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
PRODUCTSCINVOICE_ORDER_DATESOLDSCPRODUCT
0346511712019-07-09-313465117
208011712019-04-246180117
218011712019-05-2110180117
228011712019-08-0720180117
238011712019-08-2120180117
248011712019-08-2910180117
258011712019-09-1825180117
268011712019-09-1620180117
83K511712019-07-0911K5117
82K511712019-05-2821K5117
80K511712018-11-3011K5117
79K511712018-09-1121K5117
790WSC11712019-07-101001WSC117
42AG411712018-11-0521AG4117
51G311712018-11-0641G3117
771RSK211712019-07-2911RSK2117
198011712019-04-1520180117
188011712019-01-2520180117
81K511712019-04-2311K5117
168011712018-11-0750180117
34009911712018-10-2330140099117
2346511712019-06-26313465117
44009911712019-05-235140099117
772RSK211712019-08-2711RSK2117
773RSK211712019-09-2711RSK2117
1346511712019-06-18313465117
788WSC11712018-10-031001WSC117
178011712018-11-2912180117
86K511712019-09-0421K5117
85K511712019-08-1511K5117
..................
357QZS117812019-03-19181QZS117
348QZS117812019-03-12281QZS117
361QZS117812019-03-22181QZS117
358QZS117812019-03-19581QZS117
359QZS117812019-03-19281QZS117
356QZS117812019-03-19181QZS117
360QZS117812019-03-14181QZS117
368011792019-09-2440980117
358011792019-08-2210980117
348011792019-04-1910980117
328011792018-10-0120980117
832WSC11792018-09-271009WSC117
831WSC11792018-09-191009WSC117
833WSC11792018-10-021009WSC117
830WSC11792018-09-071009WSC117
338011792019-02-2510980117
834WSC11792019-01-301009WSC117
841WSC11792019-06-281009WSC117
836WSC11792019-03-112009WSC117
837WSC11792019-03-261009WSC117
839WSC11792019-06-041009WSC117
840WSC11792019-06-211009WSC117
53G311792019-02-0729G3117
842WSC11792019-08-121009WSC117
843WSC11792019-08-221009WSC117
844WSC11792019-08-271009WSC117
54G311792019-02-12149G3117
57H411792018-10-1719H4117
835WSC11792019-02-071009WSC117
838WSC11792019-05-021009WSC117
\n",
"

898 rows × 5 columns

\n",
"
"
],
"text/plain": [
" PRODUCT SC INVOICE_ORDER_DATE SOLD SCPRODUCT\n",
"0 3465117 1 2019-07-09 -3 13465117\n",
"20 80117 1 2019-04-24 6 180117\n",
"21 80117 1 2019-05-21 10 180117\n",
"22 80117 1 2019-08-07 20 180117\n",
"23 80117 1 2019-08-21 20 180117\n",
"24 80117 1 2019-08-29 10 180117\n",
"25 80117 1 2019-09-18 25 180117\n",
"26 80117 1 2019-09-16 20 180117\n",
"83 K5117 1 2019-07-09 1 1K5117\n",
"82 K5117 1 2019-05-28 2 1K5117\n",
"80 K5117 1 2018-11-30 1 1K5117\n",
"79 K5117 1 2018-09-11 2 1K5117\n",
"790 WSC117 1 2019-07-10 100 1WSC117\n",
"42 AG4117 1 2018-11-05 2 1AG4117\n",
"51 G3117 1 2018-11-06 4 1G3117\n",
"771 RSK2117 1 2019-07-29 1 1RSK2117\n",
"19 80117 1 2019-04-15 20 180117\n",
"18 80117 1 2019-01-25 20 180117\n",
"81 K5117 1 2019-04-23 1 1K5117\n",
"16 80117 1 2018-11-07 50 180117\n",
"3 40099117 1 2018-10-23 30 140099117\n",
"2 3465117 1 2019-06-26 3 13465117\n",
"4 40099117 1 2019-05-23 5 140099117\n",
"772 RSK2117 1 2019-08-27 1 1RSK2117\n",
"773 RSK2117 1 2019-09-27 1 1RSK2117\n",
"1 3465117 1 2019-06-18 3 13465117\n",
"788 WSC117 1 2018-10-03 100 1WSC117\n",
"17 80117 1 2018-11-29 12 180117\n",
"86 K5117 1 2019-09-04 2 1K5117\n",
"85 K5117 1 2019-08-15 1 1K5117\n",
".. ... .. ... ... ...\n",
"357 QZS117 81 2019-03-19 1 81QZS117\n",
"348 QZS117 81 2019-03-12 2 81QZS117\n",
"361 QZS117 81 2019-03-22 1 81QZS117\n",
"358 QZS117 81 2019-03-19 5 81QZS117\n",
"359 QZS117 81 2019-03-19 2 81QZS117\n",
"356 QZS117 81 2019-03-19 1 81QZS117\n",
"360 QZS117 81 2019-03-14 1 81QZS117\n",
"36 80117 9 2019-09-24 40 980117\n",
"35 80117 9 2019-08-22 10 980117\n",
"34 80117 9 2019-04-19 10 980117\n",
"32 80117 9 2018-10-01 20 980117\n",
"832 WSC117 9 2018-09-27 100 9WSC117\n",
"831 WSC117 9 2018-09-19 100 9WSC117\n",
"833 WSC117 9 2018-10-02 100 9WSC117\n",
"830 WSC117 9 2018-09-07 100 9WSC117\n",
"33 80117 9 2019-02-25 10 980117\n",
"834 WSC117 9 2019-01-30 100 9WSC117\n",
"841 WSC117 9 2019-06-28 100 9WSC117\n",
"836 WSC117 9 2019-03-11 200 9WSC117\n",
"837 WSC117 9 2019-03-26 100 9WSC117\n",
"839 WSC117 9 2019-06-04 100 9WSC117\n",
"840 WSC117 9 2019-06-21 100 9WSC117\n",
"53 G3117 9 2019-02-07 2 9G3117\n",
"842 WSC117 9 2019-08-12 100 9WSC117\n",
"843 WSC117 9 2019-08-22 100 9WSC117\n",
"844 WSC117 9 2019-08-27 100 9WSC117\n",
"54 G3117 9 2019-02-12 14 9G3117\n",
"57 H4117 9 2018-10-17 1 9H4117\n",
"835 WSC117 9 2019-02-07 100 9WSC117\n",
"838 WSC117 9 2019-05-02 100 9WSC117\n",
"\n",
"[898 rows x 5 columns]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sales.PRODUCT_NO=sales['PRODUCT_NO'].str[2:-1]\n",
"sales.SHIP_SC=sales['SHIP_SC'].str[2:-1]\n",
"\n",
"sales['SHIP_SC'] = sales['SHIP_SC'].astype(int)\n",
"sales['SHIP_SC'] = sales['SHIP_SC'].astype(str)\n",
"\n",
"sales.INVOICE_ORDER_DATE=sales['INVOICE_ORDER_DATE'].str[2:-1]\n",
"sales['SCPRODUCT']=sales['SHIP_SC'] + sales['PRODUCT_NO']\n",
"sales.sort_values('SHIP_SC',ascending=True,inplace=True)\n",
"sales.rename(columns={\"PRODUCT_NO\": \"PRODUCT\", \"SHIP_SC\": \"SC\",\"QUANTITY\": \"SOLD\"},inplace=True)\n",
"\n",
"sales"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"maysales=sales[(sales.INVOICE_ORDER_DATE>'2019-04-30')& (sales.INVOICE_ORDER_DATE<'2019-06-01')]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTSOLD
SCPRODUCT
1400991171400991175
18011718011710
1K51171K51172
1WSC1171WSC117100
11WSC11711WSC117100
15XLG11715XLG11717
28011728011710
20SB11720SB1172
20XLG11720XLG1173
3WSC1173WSC117100
31AG411731AG41179
33WSC11733WSC117100
49QZSL11749QZSL1171
51JN11751JN11713
52JN11752JN11736
7WSC1177WSC117100
81QZSL11781QZSL11719
81QZS11781QZS11788
9WSC1179WSC117100
\n",
"
"
],
"text/plain": [
" SC PRODUCT SOLD\n",
"SCPRODUCT \n",
"140099117 1 40099117 5\n",
"180117 1 80117 10\n",
"1K5117 1 K5117 2\n",
"1WSC117 1 WSC117 100\n",
"11WSC117 11 WSC117 100\n",
"15XLG117 15 XLG117 17\n",
"280117 2 80117 10\n",
"20SB117 20 SB117 2\n",
"20XLG117 20 XLG117 3\n",
"3WSC117 3 WSC117 100\n",
"31AG4117 31 AG4117 9\n",
"33WSC117 33 WSC117 100\n",
"49QZSL117 49 QZSL117 1\n",
"51JN117 51 JN117 13\n",
"52JN117 52 JN117 36\n",
"7WSC117 7 WSC117 100\n",
"81QZSL117 81 QZSL117 19\n",
"81QZS117 81 QZS117 88\n",
"9WSC117 9 WSC117 100"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"maysales=maysales.groupby(['SCPRODUCT']).agg({'SC':'max','PRODUCT':'max','SOLD':'sum'}) \n",
"maysales.sort_values('SC',ascending=True,inplace=True)\n",
"maysales"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
Unnamed: 0SCPRODUCTDESCRIPTIONABC_TYPEPRODUCT_VENDORACTUAL_COSTRECEIPT_PACK_QTYMIN_QOHMAX_QOH...QOH_ORDERSFORCST_QTY_CUR_MONFORCST_QTY_PREV_MONAVAILABLEABC_FACTORSAFETY_STOCK_FACTORLEAD_TIME_QUANTITY_FACTORSAFETY_STOCKLEAD_TIME_QUANTITYDATE
0121000117DMND WHL D.100 19MMGL COARSEM804291239.89905100...00000.00.00.00.00.02019-12-09 17:12:24
12851010117STAPS BRUSE HOVED Ø 9 KROMM12585122.45725100...00000.00.00.00.00.02019-12-09 17:12:24
25431020117PARALELSKÆRER 80 CM PKM85751577.97465100...00000.00.00.00.00.02019-12-09 17:12:24
\n",
"

3 rows × 27 columns

\n",
"
"
],
"text/plain": [
" Unnamed: 0 SC PRODUCT DESCRIPTION ABC_TYPE \\\n",
"0 12 1 000117 DMND WHL D.100 19MMGL COARSE M \n",
"1 285 1 010117 STAPS BRUSE HOVED Ø 9 KROM M \n",
"2 543 1 020117 PARALELSKÆRER 80 CM PK M \n",
"\n",
" PRODUCT_VENDOR ACTUAL_COST RECEIPT_PACK_QTY MIN_QOH MAX_QOH ... \\\n",
"0 804291 239.89905 1 0 0 ... \n",
"1 125851 22.45725 1 0 0 ... \n",
"2 857515 77.97465 1 0 0 ... \n",
"\n",
" QOH_ORDERS FORCST_QTY_CUR_MON FORCST_QTY_PREV_MON AVAILABLE ABC_FACTOR \\\n",
"0 0 0 0 0 0.0 \n",
"1 0 0 0 0 0.0 \n",
"2 0 0 0 0 0.0 \n",
"\n",
" SAFETY_STOCK_FACTOR LEAD_TIME_QUANTITY_FACTOR SAFETY_STOCK \\\n",
"0 0.0 0.0 0.0 \n",
"1 0.0 0.0 0.0 \n",
"2 0.0 0.0 0.0 \n",
"\n",
" LEAD_TIME_QUANTITY DATE \n",
"0 0.0 2019-12-09 17:12:24 \n",
"1 0.0 2019-12-09 17:12:24 \n",
"2 0.0 2019-12-09 17:12:24 \n",
"\n",
"[3 rows x 27 columns]"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"skus.head(3)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"skus.drop(['Unnamed: 0','DESCRIPTION','ABC_TYPE','PRODUCT_VENDOR','ACTUAL_COST'],axis=1,inplace=True)\n",
"skus.drop(['RECEIPT_PACK_QTY','MIN_QOH','MAX_QOH','ACMU','AMAD','LEAD_TIME','MIN_ORDER_QTY','EOQ'],axis=1,inplace=True)\n",
"skus.rename(columns={\"QOH\": \"ON_HAND\"},inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTON_HANDORDER_QTYQOH_ORDERSFORCST_QTY_CUR_MONFORCST_QTY_PREV_MONAVAILABLEABC_FACTORSAFETY_STOCK_FACTORLEAD_TIME_QUANTITY_FACTORSAFETY_STOCKLEAD_TIME_QUANTITYDATE
010001170000000.00.00.00.00.02019-12-09 17:12:24
110101170000000.00.00.00.00.02019-12-09 17:12:24
210201170000000.00.00.00.00.02019-12-09 17:12:24
310311170000000.00.00.00.00.02019-12-09 17:12:24
4290001170000000.00.00.00.00.02019-12-09 17:12:24
510801170000000.00.00.00.00.02019-12-09 17:12:24
6290101170000000.00.00.00.00.02019-12-09 17:12:24
7290201170000000.00.00.00.00.02019-12-09 17:12:24
811101170000000.00.00.00.00.02019-12-09 17:12:24
9290311170000000.00.00.00.00.02019-12-09 17:12:24
101834651170000000.00.00.00.00.02019-12-09 17:12:24
1111301170000000.00.00.00.00.02019-12-09 17:12:24
1218400991170000000.00.00.00.00.02019-12-09 17:12:24
13290801170000000.00.00.00.00.02019-12-09 17:12:24
141134651170000000.00.00.00.00.02019-12-09 17:12:24
1511311170000000.00.00.00.00.02019-12-09 17:12:24
1611400991171000010.00.00.00.00.02019-12-09 17:12:24
1711351170000000.00.00.00.00.02019-12-09 17:12:24
1818801170000000.00.00.00.00.02019-12-09 17:12:24
1911801176000060.00.00.00.00.02019-12-09 17:12:24
20292361170000000.00.00.00.00.02019-12-09 17:12:24
2118AG41170000000.00.00.00.00.02019-12-09 17:12:24
222934651170000000.00.00.00.00.02019-12-09 17:12:24
2329400991170000000.00.00.00.00.02019-12-09 17:12:24
2411AG41170000000.00.00.00.00.02019-12-09 17:12:24
2512361170000000.00.00.00.00.02019-12-09 17:12:24
2629801170000000.00.00.00.00.02019-12-09 17:12:24
2712601170000000.00.00.00.00.02019-12-09 17:12:24
2829941170000000.00.00.00.00.02019-12-09 17:12:24
2929A401170000000.00.00.00.00.02019-12-09 17:12:24
.............................................
840960101170000000.00.00.00.00.02019-12-09 17:12:24
841960201170000000.00.00.00.00.02019-12-09 17:12:24
842960311170000000.00.00.00.00.02019-12-09 17:12:24
843960801170000000.00.00.00.00.02019-12-09 17:12:24
844961101170000000.00.00.00.00.02019-12-09 17:12:24
845961301170000000.00.00.00.00.02019-12-09 17:12:24
846961311170000000.00.00.00.00.02019-12-09 17:12:24
847961351170000000.00.00.00.00.02019-12-09 17:12:24
848962361170000000.00.00.00.00.02019-12-09 17:12:24
849962601170000000.00.00.00.00.02019-12-09 17:12:24
8509631D011170000000.00.00.00.00.02019-12-09 17:12:24
8519634651170000000.00.00.00.00.02019-12-09 17:12:24
85296400991170000000.00.00.00.00.02019-12-09 17:12:24
8539643PB231170000000.00.00.00.00.02019-12-09 17:12:24
8549644PB311170000000.00.00.00.00.02019-12-09 17:12:24
85596801170000000.00.00.00.00.02019-12-09 17:12:24
85696931170000000.00.00.00.00.02019-12-09 17:12:24
85796941170000000.00.00.00.00.02019-12-09 17:12:24
85896A401170000000.00.00.00.00.02019-12-09 17:12:24
85996AG41170000000.00.00.00.00.02019-12-09 17:12:24
86096CP9981170000000.00.00.00.00.02019-12-09 17:12:24
86196G31170000000.00.00.00.00.02019-12-09 17:12:24
86296JN1170000000.00.00.00.00.02019-12-09 17:12:24
86396K51170000000.00.00.00.00.02019-12-09 17:12:24
86496QZS1170000000.00.00.00.00.02019-12-09 17:12:24
86596QZSL1170000000.00.00.00.00.02019-12-09 17:12:24
86696R5051170000000.00.00.00.00.02019-12-09 17:12:24
86796RSK21170000000.00.00.00.00.02019-12-09 17:12:24
86896RSM21170000000.00.00.00.00.02019-12-09 17:12:24
86996WSC1170000000.00.00.00.00.02019-12-09 17:12:24
\n",
"

870 rows × 14 columns

\n",
"
"
],
"text/plain": [
" SC PRODUCT ON_HAND ORDER_QTY QOH_ORDERS FORCST_QTY_CUR_MON \\\n",
"0 1 000117 0 0 0 0 \n",
"1 1 010117 0 0 0 0 \n",
"2 1 020117 0 0 0 0 \n",
"3 1 031117 0 0 0 0 \n",
"4 29 000117 0 0 0 0 \n",
"5 1 080117 0 0 0 0 \n",
"6 29 010117 0 0 0 0 \n",
"7 29 020117 0 0 0 0 \n",
"8 1 110117 0 0 0 0 \n",
"9 29 031117 0 0 0 0 \n",
"10 18 3465117 0 0 0 0 \n",
"11 1 130117 0 0 0 0 \n",
"12 18 40099117 0 0 0 0 \n",
"13 29 080117 0 0 0 0 \n",
"14 11 3465117 0 0 0 0 \n",
"15 1 131117 0 0 0 0 \n",
"16 11 40099117 1 0 0 0 \n",
"17 1 135117 0 0 0 0 \n",
"18 18 80117 0 0 0 0 \n",
"19 11 80117 6 0 0 0 \n",
"20 29 236117 0 0 0 0 \n",
"21 18 AG4117 0 0 0 0 \n",
"22 29 3465117 0 0 0 0 \n",
"23 29 40099117 0 0 0 0 \n",
"24 11 AG4117 0 0 0 0 \n",
"25 1 236117 0 0 0 0 \n",
"26 29 80117 0 0 0 0 \n",
"27 1 260117 0 0 0 0 \n",
"28 29 94117 0 0 0 0 \n",
"29 29 A40117 0 0 0 0 \n",
".. .. ... ... ... ... ... \n",
"840 96 010117 0 0 0 0 \n",
"841 96 020117 0 0 0 0 \n",
"842 96 031117 0 0 0 0 \n",
"843 96 080117 0 0 0 0 \n",
"844 96 110117 0 0 0 0 \n",
"845 96 130117 0 0 0 0 \n",
"846 96 131117 0 0 0 0 \n",
"847 96 135117 0 0 0 0 \n",
"848 96 236117 0 0 0 0 \n",
"849 96 260117 0 0 0 0 \n",
"850 96 31D01117 0 0 0 0 \n",
"851 96 3465117 0 0 0 0 \n",
"852 96 40099117 0 0 0 0 \n",
"853 96 43PB23117 0 0 0 0 \n",
"854 96 44PB31117 0 0 0 0 \n",
"855 96 80117 0 0 0 0 \n",
"856 96 93117 0 0 0 0 \n",
"857 96 94117 0 0 0 0 \n",
"858 96 A40117 0 0 0 0 \n",
"859 96 AG4117 0 0 0 0 \n",
"860 96 CP998117 0 0 0 0 \n",
"861 96 G3117 0 0 0 0 \n",
"862 96 JN117 0 0 0 0 \n",
"863 96 K5117 0 0 0 0 \n",
"864 96 QZS117 0 0 0 0 \n",
"865 96 QZSL117 0 0 0 0 \n",
"866 96 R505117 0 0 0 0 \n",
"867 96 RSK2117 0 0 0 0 \n",
"868 96 RSM2117 0 0 0 0 \n",
"869 96 WSC117 0 0 0 0 \n",
"\n",
" FORCST_QTY_PREV_MON AVAILABLE ABC_FACTOR SAFETY_STOCK_FACTOR \\\n",
"0 0 0 0.0 0.0 \n",
"1 0 0 0.0 0.0 \n",
"2 0 0 0.0 0.0 \n",
"3 0 0 0.0 0.0 \n",
"4 0 0 0.0 0.0 \n",
"5 0 0 0.0 0.0 \n",
"6 0 0 0.0 0.0 \n",
"7 0 0 0.0 0.0 \n",
"8 0 0 0.0 0.0 \n",
"9 0 0 0.0 0.0 \n",
"10 0 0 0.0 0.0 \n",
"11 0 0 0.0 0.0 \n",
"12 0 0 0.0 0.0 \n",
"13 0 0 0.0 0.0 \n",
"14 0 0 0.0 0.0 \n",
"15 0 0 0.0 0.0 \n",
"16 0 1 0.0 0.0 \n",
"17 0 0 0.0 0.0 \n",
"18 0 0 0.0 0.0 \n",
"19 0 6 0.0 0.0 \n",
"20 0 0 0.0 0.0 \n",
"21 0 0 0.0 0.0 \n",
"22 0 0 0.0 0.0 \n",
"23 0 0 0.0 0.0 \n",
"24 0 0 0.0 0.0 \n",
"25 0 0 0.0 0.0 \n",
"26 0 0 0.0 0.0 \n",
"27 0 0 0.0 0.0 \n",
"28 0 0 0.0 0.0 \n",
"29 0 0 0.0 0.0 \n",
".. ... ... ... ... \n",
"840 0 0 0.0 0.0 \n",
"841 0 0 0.0 0.0 \n",
"842 0 0 0.0 0.0 \n",
"843 0 0 0.0 0.0 \n",
"844 0 0 0.0 0.0 \n",
"845 0 0 0.0 0.0 \n",
"846 0 0 0.0 0.0 \n",
"847 0 0 0.0 0.0 \n",
"848 0 0 0.0 0.0 \n",
"849 0 0 0.0 0.0 \n",
"850 0 0 0.0 0.0 \n",
"851 0 0 0.0 0.0 \n",
"852 0 0 0.0 0.0 \n",
"853 0 0 0.0 0.0 \n",
"854 0 0 0.0 0.0 \n",
"855 0 0 0.0 0.0 \n",
"856 0 0 0.0 0.0 \n",
"857 0 0 0.0 0.0 \n",
"858 0 0 0.0 0.0 \n",
"859 0 0 0.0 0.0 \n",
"860 0 0 0.0 0.0 \n",
"861 0 0 0.0 0.0 \n",
"862 0 0 0.0 0.0 \n",
"863 0 0 0.0 0.0 \n",
"864 0 0 0.0 0.0 \n",
"865 0 0 0.0 0.0 \n",
"866 0 0 0.0 0.0 \n",
"867 0 0 0.0 0.0 \n",
"868 0 0 0.0 0.0 \n",
"869 0 0 0.0 0.0 \n",
"\n",
" LEAD_TIME_QUANTITY_FACTOR SAFETY_STOCK LEAD_TIME_QUANTITY \\\n",
"0 0.0 0.0 0.0 \n",
"1 0.0 0.0 0.0 \n",
"2 0.0 0.0 0.0 \n",
"3 0.0 0.0 0.0 \n",
"4 0.0 0.0 0.0 \n",
"5 0.0 0.0 0.0 \n",
"6 0.0 0.0 0.0 \n",
"7 0.0 0.0 0.0 \n",
"8 0.0 0.0 0.0 \n",
"9 0.0 0.0 0.0 \n",
"10 0.0 0.0 0.0 \n",
"11 0.0 0.0 0.0 \n",
"12 0.0 0.0 0.0 \n",
"13 0.0 0.0 0.0 \n",
"14 0.0 0.0 0.0 \n",
"15 0.0 0.0 0.0 \n",
"16 0.0 0.0 0.0 \n",
"17 0.0 0.0 0.0 \n",
"18 0.0 0.0 0.0 \n",
"19 0.0 0.0 0.0 \n",
"20 0.0 0.0 0.0 \n",
"21 0.0 0.0 0.0 \n",
"22 0.0 0.0 0.0 \n",
"23 0.0 0.0 0.0 \n",
"24 0.0 0.0 0.0 \n",
"25 0.0 0.0 0.0 \n",
"26 0.0 0.0 0.0 \n",
"27 0.0 0.0 0.0 \n",
"28 0.0 0.0 0.0 \n",
"29 0.0 0.0 0.0 \n",
".. ... ... ... \n",
"840 0.0 0.0 0.0 \n",
"841 0.0 0.0 0.0 \n",
"842 0.0 0.0 0.0 \n",
"843 0.0 0.0 0.0 \n",
"844 0.0 0.0 0.0 \n",
"845 0.0 0.0 0.0 \n",
"846 0.0 0.0 0.0 \n",
"847 0.0 0.0 0.0 \n",
"848 0.0 0.0 0.0 \n",
"849 0.0 0.0 0.0 \n",
"850 0.0 0.0 0.0 \n",
"851 0.0 0.0 0.0 \n",
"852 0.0 0.0 0.0 \n",
"853 0.0 0.0 0.0 \n",
"854 0.0 0.0 0.0 \n",
"855 0.0 0.0 0.0 \n",
"856 0.0 0.0 0.0 \n",
"857 0.0 0.0 0.0 \n",
"858 0.0 0.0 0.0 \n",
"859 0.0 0.0 0.0 \n",
"860 0.0 0.0 0.0 \n",
"861 0.0 0.0 0.0 \n",
"862 0.0 0.0 0.0 \n",
"863 0.0 0.0 0.0 \n",
"864 0.0 0.0 0.0 \n",
"865 0.0 0.0 0.0 \n",
"866 0.0 0.0 0.0 \n",
"867 0.0 0.0 0.0 \n",
"868 0.0 0.0 0.0 \n",
"869 0.0 0.0 0.0 \n",
"\n",
" DATE \n",
"0 2019-12-09 17:12:24 \n",
"1 2019-12-09 17:12:24 \n",
"2 2019-12-09 17:12:24 \n",
"3 2019-12-09 17:12:24 \n",
"4 2019-12-09 17:12:24 \n",
"5 2019-12-09 17:12:24 \n",
"6 2019-12-09 17:12:24 \n",
"7 2019-12-09 17:12:24 \n",
"8 2019-12-09 17:12:24 \n",
"9 2019-12-09 17:12:24 \n",
"10 2019-12-09 17:12:24 \n",
"11 2019-12-09 17:12:24 \n",
"12 2019-12-09 17:12:24 \n",
"13 2019-12-09 17:12:24 \n",
"14 2019-12-09 17:12:24 \n",
"15 2019-12-09 17:12:24 \n",
"16 2019-12-09 17:12:24 \n",
"17 2019-12-09 17:12:24 \n",
"18 2019-12-09 17:12:24 \n",
"19 2019-12-09 17:12:24 \n",
"20 2019-12-09 17:12:24 \n",
"21 2019-12-09 17:12:24 \n",
"22 2019-12-09 17:12:24 \n",
"23 2019-12-09 17:12:24 \n",
"24 2019-12-09 17:12:24 \n",
"25 2019-12-09 17:12:24 \n",
"26 2019-12-09 17:12:24 \n",
"27 2019-12-09 17:12:24 \n",
"28 2019-12-09 17:12:24 \n",
"29 2019-12-09 17:12:24 \n",
".. ... \n",
"840 2019-12-09 17:12:24 \n",
"841 2019-12-09 17:12:24 \n",
"842 2019-12-09 17:12:24 \n",
"843 2019-12-09 17:12:24 \n",
"844 2019-12-09 17:12:24 \n",
"845 2019-12-09 17:12:24 \n",
"846 2019-12-09 17:12:24 \n",
"847 2019-12-09 17:12:24 \n",
"848 2019-12-09 17:12:24 \n",
"849 2019-12-09 17:12:24 \n",
"850 2019-12-09 17:12:24 \n",
"851 2019-12-09 17:12:24 \n",
"852 2019-12-09 17:12:24 \n",
"853 2019-12-09 17:12:24 \n",
"854 2019-12-09 17:12:24 \n",
"855 2019-12-09 17:12:24 \n",
"856 2019-12-09 17:12:24 \n",
"857 2019-12-09 17:12:24 \n",
"858 2019-12-09 17:12:24 \n",
"859 2019-12-09 17:12:24 \n",
"860 2019-12-09 17:12:24 \n",
"861 2019-12-09 17:12:24 \n",
"862 2019-12-09 17:12:24 \n",
"863 2019-12-09 17:12:24 \n",
"864 2019-12-09 17:12:24 \n",
"865 2019-12-09 17:12:24 \n",
"866 2019-12-09 17:12:24 \n",
"867 2019-12-09 17:12:24 \n",
"868 2019-12-09 17:12:24 \n",
"869 2019-12-09 17:12:24 \n",
"\n",
"[870 rows x 14 columns]"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"skus.sort_values('SC',ascending=True)\n",
"skus"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"skus['SC'] = skus['SC'].astype(str)\n",
"\n",
"skus['SCPRODUCT']=skus['SC'] + skus['PRODUCT']\n",
"skus.sort_values('SC',ascending=True,inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTON_HANDORDER_QTYQOH_ORDERSFORCST_QTY_CUR_MONFORCST_QTY_PREV_MONAVAILABLEABC_FACTORSAFETY_STOCK_FACTORLEAD_TIME_QUANTITY_FACTORSAFETY_STOCKLEAD_TIME_QUANTITYDATESCPRODUCT
010001170000000.00.000.00.000.02019-12-09 17:12:241000117
3314009911721300002130.00.000.00.000.02019-12-09 17:12:24140099117
341415651170000000.00.000.00.000.02019-12-09 17:12:24141565117
35143PB231170000000.00.000.00.000.02019-12-09 17:12:24143PB23117
901QZSL1170000000.00.000.00.000.02019-12-09 17:12:241QZSL117
4018011795415031288612.01.481.050.32153.02019-12-09 17:12:24180117
411931170000000.00.000.00.000.02019-12-09 17:12:24193117
421941170000000.00.000.00.000.02019-12-09 17:12:24194117
431A401170000000.00.000.00.000.02019-12-09 17:12:241A40117
441AG4117390000390.00.000.00.000.02019-12-09 17:12:241AG4117
511CP9981170000000.00.000.00.000.02019-12-09 17:12:241CP998117
571DRM91170000000.00.000.00.000.02019-12-09 17:12:241DRM9117
32134651170000000.00.000.00.000.02019-12-09 17:12:2413465117
1121XLG1170000000.00.000.00.000.02019-12-09 17:12:241XLG117
1071W941170000000.00.000.00.000.02019-12-09 17:12:241W94117
1051V04Z1170000000.00.000.00.000.02019-12-09 17:12:241V04Z117
1041V027681170000000.00.000.00.000.02019-12-09 17:12:241V02768117
991SB1170000000.00.000.00.000.02019-12-09 17:12:241SB117
951RSM21174000040.00.000.00.000.02019-12-09 17:12:241RSM2117
941RSK21170050100.00.000.00.000.02019-12-09 17:12:241RSK2117
691G31171000000.00.000.00.000.02019-12-09 17:12:241G3117
701GP1170000000.00.000.00.000.02019-12-09 17:12:241GP117
921R5051170000000.00.000.00.000.02019-12-09 17:12:241R505117
721JN1170000000.00.000.00.000.02019-12-09 17:12:241JN117
731K51176001262.01.481.02.960.92019-12-09 17:12:241K5117
1101WSC117130000521612050.00.000.00.000.02019-12-09 17:12:241WSC117
31131D011170000000.00.000.00.000.02019-12-09 17:12:24131D01117
37144PB311170000000.00.000.00.000.02019-12-09 17:12:24144PB31117
1511311170000000.00.000.00.000.02019-12-09 17:12:241131117
110101170000000.00.000.00.000.02019-12-09 17:12:241010117
................................................
85696931170000000.00.000.00.000.02019-12-09 17:12:249693117
85796941170000000.00.000.00.000.02019-12-09 17:12:249694117
85896A401170000000.00.000.00.000.02019-12-09 17:12:2496A40117
85996AG41170000000.00.000.00.000.02019-12-09 17:12:2496AG4117
86196G31170000000.00.000.00.000.02019-12-09 17:12:2496G3117
85596801170000000.00.000.00.000.02019-12-09 17:12:249680117
86396K51170000000.00.000.00.000.02019-12-09 17:12:2496K5117
86496QZS1170000000.00.000.00.000.02019-12-09 17:12:2496QZS117
86596QZSL1170000000.00.000.00.000.02019-12-09 17:12:2496QZSL117
86696R5051170000000.00.000.00.000.02019-12-09 17:12:2496R505117
86796RSK21170000000.00.000.00.000.02019-12-09 17:12:2496RSK2117
86296JN1170000000.00.000.00.000.02019-12-09 17:12:2496JN117
8549644PB311170000000.00.000.00.000.02019-12-09 17:12:249644PB31117
86896RSM21170000000.00.000.00.000.02019-12-09 17:12:2496RSM2117
85296400991170000000.00.000.00.000.02019-12-09 17:12:249640099117
8519634651170000000.00.000.00.000.02019-12-09 17:12:24963465117
8509631D011170000000.00.000.00.000.02019-12-09 17:12:249631D01117
849962601170000000.00.000.00.000.02019-12-09 17:12:2496260117
848962361170000000.00.000.00.000.02019-12-09 17:12:2496236117
847961351170000000.00.000.00.000.02019-12-09 17:12:2496135117
846961311170000000.00.000.00.000.02019-12-09 17:12:2496131117
845961301170000000.00.000.00.000.02019-12-09 17:12:2496130117
844961101170000000.00.000.00.000.02019-12-09 17:12:2496110117
843960801170000000.00.000.00.000.02019-12-09 17:12:2496080117
842960311170000000.00.000.00.000.02019-12-09 17:12:2496031117
841960201170000000.00.000.00.000.02019-12-09 17:12:2496020117
840960101170000000.00.000.00.000.02019-12-09 17:12:2496010117
839960001170000000.00.000.00.000.02019-12-09 17:12:2496000117
8539643PB231170000000.00.000.00.000.02019-12-09 17:12:249643PB23117
86996WSC1170000000.00.000.00.000.02019-12-09 17:12:2496WSC117
\n",
"

870 rows × 15 columns

\n",
"
"
],
"text/plain": [
" SC PRODUCT ON_HAND ORDER_QTY QOH_ORDERS FORCST_QTY_CUR_MON \\\n",
"0 1 000117 0 0 0 0 \n",
"33 1 40099117 213 0 0 0 \n",
"34 1 41565117 0 0 0 0 \n",
"35 1 43PB23117 0 0 0 0 \n",
"90 1 QZSL117 0 0 0 0 \n",
"40 1 80117 954 15 0 31 \n",
"41 1 93117 0 0 0 0 \n",
"42 1 94117 0 0 0 0 \n",
"43 1 A40117 0 0 0 0 \n",
"44 1 AG4117 39 0 0 0 \n",
"51 1 CP998117 0 0 0 0 \n",
"57 1 DRM9117 0 0 0 0 \n",
"32 1 3465117 0 0 0 0 \n",
"112 1 XLG117 0 0 0 0 \n",
"107 1 W94117 0 0 0 0 \n",
"105 1 V04Z117 0 0 0 0 \n",
"104 1 V02768117 0 0 0 0 \n",
"99 1 SB117 0 0 0 0 \n",
"95 1 RSM2117 4 0 0 0 \n",
"94 1 RSK2117 0 0 5 0 \n",
"69 1 G3117 1 0 0 0 \n",
"70 1 GP117 0 0 0 0 \n",
"92 1 R505117 0 0 0 0 \n",
"72 1 JN117 0 0 0 0 \n",
"73 1 K5117 6 0 0 1 \n",
"110 1 WSC117 1300 0 0 52 \n",
"31 1 31D01117 0 0 0 0 \n",
"37 1 44PB31117 0 0 0 0 \n",
"15 1 131117 0 0 0 0 \n",
"1 1 010117 0 0 0 0 \n",
".. .. ... ... ... ... ... \n",
"856 96 93117 0 0 0 0 \n",
"857 96 94117 0 0 0 0 \n",
"858 96 A40117 0 0 0 0 \n",
"859 96 AG4117 0 0 0 0 \n",
"861 96 G3117 0 0 0 0 \n",
"855 96 80117 0 0 0 0 \n",
"863 96 K5117 0 0 0 0 \n",
"864 96 QZS117 0 0 0 0 \n",
"865 96 QZSL117 0 0 0 0 \n",
"866 96 R505117 0 0 0 0 \n",
"867 96 RSK2117 0 0 0 0 \n",
"862 96 JN117 0 0 0 0 \n",
"854 96 44PB31117 0 0 0 0 \n",
"868 96 RSM2117 0 0 0 0 \n",
"852 96 40099117 0 0 0 0 \n",
"851 96 3465117 0 0 0 0 \n",
"850 96 31D01117 0 0 0 0 \n",
"849 96 260117 0 0 0 0 \n",
"848 96 236117 0 0 0 0 \n",
"847 96 135117 0 0 0 0 \n",
"846 96 131117 0 0 0 0 \n",
"845 96 130117 0 0 0 0 \n",
"844 96 110117 0 0 0 0 \n",
"843 96 080117 0 0 0 0 \n",
"842 96 031117 0 0 0 0 \n",
"841 96 020117 0 0 0 0 \n",
"840 96 010117 0 0 0 0 \n",
"839 96 000117 0 0 0 0 \n",
"853 96 43PB23117 0 0 0 0 \n",
"869 96 WSC117 0 0 0 0 \n",
"\n",
" FORCST_QTY_PREV_MON AVAILABLE ABC_FACTOR SAFETY_STOCK_FACTOR \\\n",
"0 0 0 0.0 0.00 \n",
"33 0 213 0.0 0.00 \n",
"34 0 0 0.0 0.00 \n",
"35 0 0 0.0 0.00 \n",
"90 0 0 0.0 0.00 \n",
"40 28 861 2.0 1.48 \n",
"41 0 0 0.0 0.00 \n",
"42 0 0 0.0 0.00 \n",
"43 0 0 0.0 0.00 \n",
"44 0 39 0.0 0.00 \n",
"51 0 0 0.0 0.00 \n",
"57 0 0 0.0 0.00 \n",
"32 0 0 0.0 0.00 \n",
"112 0 0 0.0 0.00 \n",
"107 0 0 0.0 0.00 \n",
"105 0 0 0.0 0.00 \n",
"104 0 0 0.0 0.00 \n",
"99 0 0 0.0 0.00 \n",
"95 0 4 0.0 0.00 \n",
"94 1 0 0.0 0.00 \n",
"69 0 0 0.0 0.00 \n",
"70 0 0 0.0 0.00 \n",
"92 0 0 0.0 0.00 \n",
"72 0 0 0.0 0.00 \n",
"73 2 6 2.0 1.48 \n",
"110 16 1205 0.0 0.00 \n",
"31 0 0 0.0 0.00 \n",
"37 0 0 0.0 0.00 \n",
"15 0 0 0.0 0.00 \n",
"1 0 0 0.0 0.00 \n",
".. ... ... ... ... \n",
"856 0 0 0.0 0.00 \n",
"857 0 0 0.0 0.00 \n",
"858 0 0 0.0 0.00 \n",
"859 0 0 0.0 0.00 \n",
"861 0 0 0.0 0.00 \n",
"855 0 0 0.0 0.00 \n",
"863 0 0 0.0 0.00 \n",
"864 0 0 0.0 0.00 \n",
"865 0 0 0.0 0.00 \n",
"866 0 0 0.0 0.00 \n",
"867 0 0 0.0 0.00 \n",
"862 0 0 0.0 0.00 \n",
"854 0 0 0.0 0.00 \n",
"868 0 0 0.0 0.00 \n",
"852 0 0 0.0 0.00 \n",
"851 0 0 0.0 0.00 \n",
"850 0 0 0.0 0.00 \n",
"849 0 0 0.0 0.00 \n",
"848 0 0 0.0 0.00 \n",
"847 0 0 0.0 0.00 \n",
"846 0 0 0.0 0.00 \n",
"845 0 0 0.0 0.00 \n",
"844 0 0 0.0 0.00 \n",
"843 0 0 0.0 0.00 \n",
"842 0 0 0.0 0.00 \n",
"841 0 0 0.0 0.00 \n",
"840 0 0 0.0 0.00 \n",
"839 0 0 0.0 0.00 \n",
"853 0 0 0.0 0.00 \n",
"869 0 0 0.0 0.00 \n",
"\n",
" LEAD_TIME_QUANTITY_FACTOR SAFETY_STOCK LEAD_TIME_QUANTITY \\\n",
"0 0.0 0.00 0.0 \n",
"33 0.0 0.00 0.0 \n",
"34 0.0 0.00 0.0 \n",
"35 0.0 0.00 0.0 \n",
"90 0.0 0.00 0.0 \n",
"40 1.0 50.32 153.0 \n",
"41 0.0 0.00 0.0 \n",
"42 0.0 0.00 0.0 \n",
"43 0.0 0.00 0.0 \n",
"44 0.0 0.00 0.0 \n",
"51 0.0 0.00 0.0 \n",
"57 0.0 0.00 0.0 \n",
"32 0.0 0.00 0.0 \n",
"112 0.0 0.00 0.0 \n",
"107 0.0 0.00 0.0 \n",
"105 0.0 0.00 0.0 \n",
"104 0.0 0.00 0.0 \n",
"99 0.0 0.00 0.0 \n",
"95 0.0 0.00 0.0 \n",
"94 0.0 0.00 0.0 \n",
"69 0.0 0.00 0.0 \n",
"70 0.0 0.00 0.0 \n",
"92 0.0 0.00 0.0 \n",
"72 0.0 0.00 0.0 \n",
"73 1.0 2.96 0.9 \n",
"110 0.0 0.00 0.0 \n",
"31 0.0 0.00 0.0 \n",
"37 0.0 0.00 0.0 \n",
"15 0.0 0.00 0.0 \n",
"1 0.0 0.00 0.0 \n",
".. ... ... ... \n",
"856 0.0 0.00 0.0 \n",
"857 0.0 0.00 0.0 \n",
"858 0.0 0.00 0.0 \n",
"859 0.0 0.00 0.0 \n",
"861 0.0 0.00 0.0 \n",
"855 0.0 0.00 0.0 \n",
"863 0.0 0.00 0.0 \n",
"864 0.0 0.00 0.0 \n",
"865 0.0 0.00 0.0 \n",
"866 0.0 0.00 0.0 \n",
"867 0.0 0.00 0.0 \n",
"862 0.0 0.00 0.0 \n",
"854 0.0 0.00 0.0 \n",
"868 0.0 0.00 0.0 \n",
"852 0.0 0.00 0.0 \n",
"851 0.0 0.00 0.0 \n",
"850 0.0 0.00 0.0 \n",
"849 0.0 0.00 0.0 \n",
"848 0.0 0.00 0.0 \n",
"847 0.0 0.00 0.0 \n",
"846 0.0 0.00 0.0 \n",
"845 0.0 0.00 0.0 \n",
"844 0.0 0.00 0.0 \n",
"843 0.0 0.00 0.0 \n",
"842 0.0 0.00 0.0 \n",
"841 0.0 0.00 0.0 \n",
"840 0.0 0.00 0.0 \n",
"839 0.0 0.00 0.0 \n",
"853 0.0 0.00 0.0 \n",
"869 0.0 0.00 0.0 \n",
"\n",
" DATE SCPRODUCT \n",
"0 2019-12-09 17:12:24 1000117 \n",
"33 2019-12-09 17:12:24 140099117 \n",
"34 2019-12-09 17:12:24 141565117 \n",
"35 2019-12-09 17:12:24 143PB23117 \n",
"90 2019-12-09 17:12:24 1QZSL117 \n",
"40 2019-12-09 17:12:24 180117 \n",
"41 2019-12-09 17:12:24 193117 \n",
"42 2019-12-09 17:12:24 194117 \n",
"43 2019-12-09 17:12:24 1A40117 \n",
"44 2019-12-09 17:12:24 1AG4117 \n",
"51 2019-12-09 17:12:24 1CP998117 \n",
"57 2019-12-09 17:12:24 1DRM9117 \n",
"32 2019-12-09 17:12:24 13465117 \n",
"112 2019-12-09 17:12:24 1XLG117 \n",
"107 2019-12-09 17:12:24 1W94117 \n",
"105 2019-12-09 17:12:24 1V04Z117 \n",
"104 2019-12-09 17:12:24 1V02768117 \n",
"99 2019-12-09 17:12:24 1SB117 \n",
"95 2019-12-09 17:12:24 1RSM2117 \n",
"94 2019-12-09 17:12:24 1RSK2117 \n",
"69 2019-12-09 17:12:24 1G3117 \n",
"70 2019-12-09 17:12:24 1GP117 \n",
"92 2019-12-09 17:12:24 1R505117 \n",
"72 2019-12-09 17:12:24 1JN117 \n",
"73 2019-12-09 17:12:24 1K5117 \n",
"110 2019-12-09 17:12:24 1WSC117 \n",
"31 2019-12-09 17:12:24 131D01117 \n",
"37 2019-12-09 17:12:24 144PB31117 \n",
"15 2019-12-09 17:12:24 1131117 \n",
"1 2019-12-09 17:12:24 1010117 \n",
".. ... ... \n",
"856 2019-12-09 17:12:24 9693117 \n",
"857 2019-12-09 17:12:24 9694117 \n",
"858 2019-12-09 17:12:24 96A40117 \n",
"859 2019-12-09 17:12:24 96AG4117 \n",
"861 2019-12-09 17:12:24 96G3117 \n",
"855 2019-12-09 17:12:24 9680117 \n",
"863 2019-12-09 17:12:24 96K5117 \n",
"864 2019-12-09 17:12:24 96QZS117 \n",
"865 2019-12-09 17:12:24 96QZSL117 \n",
"866 2019-12-09 17:12:24 96R505117 \n",
"867 2019-12-09 17:12:24 96RSK2117 \n",
"862 2019-12-09 17:12:24 96JN117 \n",
"854 2019-12-09 17:12:24 9644PB31117 \n",
"868 2019-12-09 17:12:24 96RSM2117 \n",
"852 2019-12-09 17:12:24 9640099117 \n",
"851 2019-12-09 17:12:24 963465117 \n",
"850 2019-12-09 17:12:24 9631D01117 \n",
"849 2019-12-09 17:12:24 96260117 \n",
"848 2019-12-09 17:12:24 96236117 \n",
"847 2019-12-09 17:12:24 96135117 \n",
"846 2019-12-09 17:12:24 96131117 \n",
"845 2019-12-09 17:12:24 96130117 \n",
"844 2019-12-09 17:12:24 96110117 \n",
"843 2019-12-09 17:12:24 96080117 \n",
"842 2019-12-09 17:12:24 96031117 \n",
"841 2019-12-09 17:12:24 96020117 \n",
"840 2019-12-09 17:12:24 96010117 \n",
"839 2019-12-09 17:12:24 96000117 \n",
"853 2019-12-09 17:12:24 9643PB23117 \n",
"869 2019-12-09 17:12:24 96WSC117 \n",
"\n",
"[870 rows x 15 columns]"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"skus"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTON_HAND
SCPRODUCT
10000117100001170
100011710001170
10010117100101170
10020117100201170
10031117100311170
10080117100801170
101011710101170
10110117101101170
10130117101301170
10131117101311170
10135117101351170
102011710201170
10236117102361170
10260117102601170
103111710311170
1031D011171031D011170
1034651171034651170
104009911710400991170
1043PB231171043PB231170
1044PB311171044PB311170
108011710801170
109311710931170
109411710941170
10A4011710A401170
10AG411710AG41170
10CP99811710CP9981170
10DRM911710DRM91170
10G311710G31170
10GP11710GP1170
10JN11710JN1170
............
9644PB311179644PB311170
968011796801170
969311796931170
969411796941170
96A4011796A401170
96AG411796AG41170
96CP99811796CP9981170
96G311796G31170
96JN11796JN1170
96K511796K51170
96QZS11796QZS1170
96QZSL11796QZSL1170
96R50511796R5051170
96RSK211796RSK21170
96RSM211796RSM21170
96WSC11796WSC1170
9801179801172
9AG41179AG41170
9CP9981179CP9981170
9G31179G31170
9GP1179GP1170
9JN1179JN1170
9K51179K51170
9R5051179R5051170
9RSK21179RSK21170
9RSM21179RSM21170
9SB1179SB1170
9V04Z1179V04Z1170
9WSC1179WSC117300
9XLG1179XLG1170
\n",
"

868 rows × 3 columns

\n",
"
"
],
"text/plain": [
" SC PRODUCT ON_HAND\n",
"SCPRODUCT \n",
"10000117 10 000117 0\n",
"1000117 1 000117 0\n",
"10010117 10 010117 0\n",
"10020117 10 020117 0\n",
"10031117 10 031117 0\n",
"10080117 10 080117 0\n",
"1010117 1 010117 0\n",
"10110117 10 110117 0\n",
"10130117 10 130117 0\n",
"10131117 10 131117 0\n",
"10135117 10 135117 0\n",
"1020117 1 020117 0\n",
"10236117 10 236117 0\n",
"10260117 10 260117 0\n",
"1031117 1 031117 0\n",
"1031D01117 10 31D01117 0\n",
"103465117 10 3465117 0\n",
"1040099117 10 40099117 0\n",
"1043PB23117 10 43PB23117 0\n",
"1044PB31117 10 44PB31117 0\n",
"1080117 10 80117 0\n",
"1093117 10 93117 0\n",
"1094117 10 94117 0\n",
"10A40117 10 A40117 0\n",
"10AG4117 10 AG4117 0\n",
"10CP998117 10 CP998117 0\n",
"10DRM9117 10 DRM9117 0\n",
"10G3117 10 G3117 0\n",
"10GP117 10 GP117 0\n",
"10JN117 10 JN117 0\n",
"... .. ... ...\n",
"9644PB31117 96 44PB31117 0\n",
"9680117 96 80117 0\n",
"9693117 96 93117 0\n",
"9694117 96 94117 0\n",
"96A40117 96 A40117 0\n",
"96AG4117 96 AG4117 0\n",
"96CP998117 96 CP998117 0\n",
"96G3117 96 G3117 0\n",
"96JN117 96 JN117 0\n",
"96K5117 96 K5117 0\n",
"96QZS117 96 QZS117 0\n",
"96QZSL117 96 QZSL117 0\n",
"96R505117 96 R505117 0\n",
"96RSK2117 96 RSK2117 0\n",
"96RSM2117 96 RSM2117 0\n",
"96WSC117 96 WSC117 0\n",
"980117 9 80117 2\n",
"9AG4117 9 AG4117 0\n",
"9CP998117 9 CP998117 0\n",
"9G3117 9 G3117 0\n",
"9GP117 9 GP117 0\n",
"9JN117 9 JN117 0\n",
"9K5117 9 K5117 0\n",
"9R505117 9 R505117 0\n",
"9RSK2117 9 RSK2117 0\n",
"9RSM2117 9 RSM2117 0\n",
"9SB117 9 SB117 0\n",
"9V04Z117 9 V04Z117 0\n",
"9WSC117 9 WSC117 300\n",
"9XLG117 9 XLG117 0\n",
"\n",
"[868 rows x 3 columns]"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"skutable=skus.groupby(['SCPRODUCT']).agg({'SC':'max','PRODUCT':'max','ON_HAND':'sum'}) \n",
"skutable.sort_values('SC',ascending=True)\n",
"skutable"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
Unnamed: 0RUN_DATETOFRDATEPRODUCTVENDORQTY
010/3/20195:33:42 PM1512019-05-1340099117BR-012
110/3/20195:33:42 PM212019-05-07801171429058
210/3/20195:33:42 PM212019-05-28801171429058
310/3/20195:33:42 PM212019-01-07WSC117121560100
410/3/20195:33:42 PM312019-01-028011714290510
510/3/20195:33:42 PM312019-05-208011714290510
610/3/20195:33:42 PM312019-01-21WSC117121560200
710/3/20195:33:42 PM312019-05-16WSC117121560100
810/3/20195:33:42 PM312019-06-07WSC117121560100
910/3/20195:33:42 PM312019-06-20WSC117121560100
1010/3/20195:33:42 PM312019-08-30WSC117121560100
1110/3/20195:33:42 PM4212018-12-07SB117BR-201
1210/3/20195:33:42 PM512018-12-274009911714290510
1310/3/20195:33:42 PM512018-10-29WSC117121560100
1410/3/20195:33:42 PM512018-11-09WSC117121560100
1510/3/20195:33:42 PM512019-01-08WSC117121560100
1610/3/20195:33:42 PM512019-07-25WSC117121560100
1710/3/20195:33:42 PM512019-08-01WSC117121560100
1810/3/20195:33:42 PM5202018-12-14XLG1171323277
1910/3/20195:33:42 PM5202019-01-29XLG1171323279
2010/3/20195:33:42 PM612019-01-05RSK21171354401
2110/3/20195:33:42 PM612018-10-31WSC117121560200
2210/3/20195:33:42 PM612019-03-21WSC117121560100
2310/3/20195:33:42 PM612019-04-15WSC117121560100
2410/3/20195:33:42 PM612019-04-23WSC117121560100
2510/3/20195:33:42 PM612019-06-19WSC117121560200
2610/3/20195:33:42 PM612019-07-26WSC117121560300
2710/3/20195:33:42 PM6212019-04-26XLG117BR-203
2810/3/20195:33:42 PM6212019-07-22XLG117BR-203
2910/3/20195:33:42 PM712019-02-26WSC117121560100
...........................
9110/3/20195:33:42 PM21202019-07-17XLG1171323273
9210/3/20195:33:42 PM21202019-08-12XLG1171323272
9310/3/20195:33:42 PM2212019-09-26WSC117BR-01100
9410/3/20195:33:42 PM22202018-10-30SB1179999201
9510/3/20195:33:42 PM22202018-11-06SB1179999201
9610/3/20195:33:42 PM22202018-11-06SB1179999201
9710/3/20195:33:42 PM22202019-08-16SB1179999201
9810/3/20195:33:42 PM22202019-08-16SB1179999201
9910/3/20195:33:42 PM22202019-05-29XLG1171323273
10010/3/20195:33:42 PM22202019-06-20XLG1171323273
10110/3/20195:33:42 PM3112018-11-09AG411710162012
10210/3/20195:33:42 PM3112019-02-04AG41171016205
10310/3/20195:33:42 PM3112019-04-01AG411710162010
10410/3/20195:33:42 PM3112019-05-13AG41171016208
10510/3/20195:33:42 PM3112019-06-17AG411710162012
10610/3/20195:33:42 PM3112019-04-22G31171355101
10710/3/20195:33:42 PM3212019-09-17WSC117121560100
10810/3/20195:33:42 PM3312018-12-10K51171355101
10910/3/20195:33:42 PM3412018-11-05WSC117121560100
11010/3/20195:33:42 PM52512018-10-08JN11741138024
11110/3/20195:33:42 PM52512018-11-07JN11741138024
11210/3/20195:33:42 PM52512019-01-21JN11741138048
11310/3/20195:33:42 PM52512019-05-20JN11741138048
11410/3/20195:33:42 PM53512019-01-30DRM9117BR-4530
11510/3/20195:33:42 PM53512019-06-05JN11741138012
11610/3/20195:33:42 PM53522019-05-28DRM9117BR-5113
11710/8/20199:08:17 AM212019-10-07WSC117121560100
11810/8/20199:08:17 AM1612019-10-07K51171355104
11910/8/20199:08:17 AM16212019-10-07SB117BR-201
12010/8/20199:08:17 AM2212019-10-01WSC117121560100
\n",
"

121 rows × 8 columns

\n",
"
"
],
"text/plain": [
" Unnamed: 0 RUN_DATE TO FR DATE PRODUCT VENDOR QTY\n",
"0 10/3/2019 5:33:42 PM 1 51 2019-05-13 40099117 BR-01 2\n",
"1 10/3/2019 5:33:42 PM 2 1 2019-05-07 80117 142905 8\n",
"2 10/3/2019 5:33:42 PM 2 1 2019-05-28 80117 142905 8\n",
"3 10/3/2019 5:33:42 PM 2 1 2019-01-07 WSC117 121560 100\n",
"4 10/3/2019 5:33:42 PM 3 1 2019-01-02 80117 142905 10\n",
"5 10/3/2019 5:33:42 PM 3 1 2019-05-20 80117 142905 10\n",
"6 10/3/2019 5:33:42 PM 3 1 2019-01-21 WSC117 121560 200\n",
"7 10/3/2019 5:33:42 PM 3 1 2019-05-16 WSC117 121560 100\n",
"8 10/3/2019 5:33:42 PM 3 1 2019-06-07 WSC117 121560 100\n",
"9 10/3/2019 5:33:42 PM 3 1 2019-06-20 WSC117 121560 100\n",
"10 10/3/2019 5:33:42 PM 3 1 2019-08-30 WSC117 121560 100\n",
"11 10/3/2019 5:33:42 PM 4 21 2018-12-07 SB117 BR-20 1\n",
"12 10/3/2019 5:33:42 PM 5 1 2018-12-27 40099117 142905 10\n",
"13 10/3/2019 5:33:42 PM 5 1 2018-10-29 WSC117 121560 100\n",
"14 10/3/2019 5:33:42 PM 5 1 2018-11-09 WSC117 121560 100\n",
"15 10/3/2019 5:33:42 PM 5 1 2019-01-08 WSC117 121560 100\n",
"16 10/3/2019 5:33:42 PM 5 1 2019-07-25 WSC117 121560 100\n",
"17 10/3/2019 5:33:42 PM 5 1 2019-08-01 WSC117 121560 100\n",
"18 10/3/2019 5:33:42 PM 5 20 2018-12-14 XLG117 132327 7\n",
"19 10/3/2019 5:33:42 PM 5 20 2019-01-29 XLG117 132327 9\n",
"20 10/3/2019 5:33:42 PM 6 1 2019-01-05 RSK2117 135440 1\n",
"21 10/3/2019 5:33:42 PM 6 1 2018-10-31 WSC117 121560 200\n",
"22 10/3/2019 5:33:42 PM 6 1 2019-03-21 WSC117 121560 100\n",
"23 10/3/2019 5:33:42 PM 6 1 2019-04-15 WSC117 121560 100\n",
"24 10/3/2019 5:33:42 PM 6 1 2019-04-23 WSC117 121560 100\n",
"25 10/3/2019 5:33:42 PM 6 1 2019-06-19 WSC117 121560 200\n",
"26 10/3/2019 5:33:42 PM 6 1 2019-07-26 WSC117 121560 300\n",
"27 10/3/2019 5:33:42 PM 6 21 2019-04-26 XLG117 BR-20 3\n",
"28 10/3/2019 5:33:42 PM 6 21 2019-07-22 XLG117 BR-20 3\n",
"29 10/3/2019 5:33:42 PM 7 1 2019-02-26 WSC117 121560 100\n",
".. ... ... .. .. ... ... ... ...\n",
"91 10/3/2019 5:33:42 PM 21 20 2019-07-17 XLG117 132327 3\n",
"92 10/3/2019 5:33:42 PM 21 20 2019-08-12 XLG117 132327 2\n",
"93 10/3/2019 5:33:42 PM 22 1 2019-09-26 WSC117 BR-01 100\n",
"94 10/3/2019 5:33:42 PM 22 20 2018-10-30 SB117 999920 1\n",
"95 10/3/2019 5:33:42 PM 22 20 2018-11-06 SB117 999920 1\n",
"96 10/3/2019 5:33:42 PM 22 20 2018-11-06 SB117 999920 1\n",
"97 10/3/2019 5:33:42 PM 22 20 2019-08-16 SB117 999920 1\n",
"98 10/3/2019 5:33:42 PM 22 20 2019-08-16 SB117 999920 1\n",
"99 10/3/2019 5:33:42 PM 22 20 2019-05-29 XLG117 132327 3\n",
"100 10/3/2019 5:33:42 PM 22 20 2019-06-20 XLG117 132327 3\n",
"101 10/3/2019 5:33:42 PM 31 1 2018-11-09 AG4117 101620 12\n",
"102 10/3/2019 5:33:42 PM 31 1 2019-02-04 AG4117 101620 5\n",
"103 10/3/2019 5:33:42 PM 31 1 2019-04-01 AG4117 101620 10\n",
"104 10/3/2019 5:33:42 PM 31 1 2019-05-13 AG4117 101620 8\n",
"105 10/3/2019 5:33:42 PM 31 1 2019-06-17 AG4117 101620 12\n",
"106 10/3/2019 5:33:42 PM 31 1 2019-04-22 G3117 135510 1\n",
"107 10/3/2019 5:33:42 PM 32 1 2019-09-17 WSC117 121560 100\n",
"108 10/3/2019 5:33:42 PM 33 1 2018-12-10 K5117 135510 1\n",
"109 10/3/2019 5:33:42 PM 34 1 2018-11-05 WSC117 121560 100\n",
"110 10/3/2019 5:33:42 PM 52 51 2018-10-08 JN117 411380 24\n",
"111 10/3/2019 5:33:42 PM 52 51 2018-11-07 JN117 411380 24\n",
"112 10/3/2019 5:33:42 PM 52 51 2019-01-21 JN117 411380 48\n",
"113 10/3/2019 5:33:42 PM 52 51 2019-05-20 JN117 411380 48\n",
"114 10/3/2019 5:33:42 PM 53 51 2019-01-30 DRM9117 BR-45 30\n",
"115 10/3/2019 5:33:42 PM 53 51 2019-06-05 JN117 411380 12\n",
"116 10/3/2019 5:33:42 PM 53 52 2019-05-28 DRM9117 BR-51 13\n",
"117 10/8/2019 9:08:17 AM 2 1 2019-10-07 WSC117 121560 100\n",
"118 10/8/2019 9:08:17 AM 16 1 2019-10-07 K5117 135510 4\n",
"119 10/8/2019 9:08:17 AM 16 21 2019-10-07 SB117 BR-20 1\n",
"120 10/8/2019 9:08:17 AM 22 1 2019-10-01 WSC117 121560 100\n",
"\n",
"[121 rows x 8 columns]"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"transfers"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"transfers.drop(['Unnamed: 0','RUN_DATE','FR','VENDOR'],inplace=True,axis=1)\n",
"transfers.DATE=pd.to_datetime(transfers.DATE)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"maytransfers=transfers[(transfers.DATE>'2019-04-30')& (transfers.DATE<'2019-06-01')]"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 1\n",
"1 2\n",
"2 2\n",
"5 3\n",
"7 3\n",
"32 7\n",
"33 7\n",
"78 16\n",
"99 22\n",
"104 31\n",
"113 52\n",
"116 53\n",
"Name: TO, dtype: int64"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"maytransfers.TO"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/alex/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
" \"\"\"Entry point for launching an IPython kernel.\n",
"/Users/alex/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py:4025: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
" return super(DataFrame, self).rename(**kwargs)\n"
]
}
],
"source": [
"maytransfers['TO'] = maytransfers['TO'].astype(str)\n",
"\n",
"maytransfers.rename(columns={\"TO\": \"SC\", \"QTY\": \"TRANSFERRED_IN\"},inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/alex/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
"Try using .loc[row_indexer,col_indexer] = value instead\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
" \"\"\"Entry point for launching an IPython kernel.\n",
"/Users/alex/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:2: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
" \n"
]
}
],
"source": [
"maytransfers['SCPRODUCT']=maytransfers['SC'] + maytransfers['PRODUCT']\n",
"maytransfers.sort_values('SC',ascending=True,inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
TRANSFERRED_INSCPRODUCT
SCPRODUCT
1400991172140099117
16XLG117116XLG117
22XLG117322XLG117
28011716280117
31AG4117831AG4117
38011710380117
3WSC1171003WSC117
52JN1174852JN117
53DRM91171353DRM9117
7WSC1172007WSC117
\n",
"
"
],
"text/plain": [
" TRANSFERRED_IN SC PRODUCT\n",
"SCPRODUCT \n",
"140099117 2 1 40099117\n",
"16XLG117 1 16 XLG117\n",
"22XLG117 3 22 XLG117\n",
"280117 16 2 80117\n",
"31AG4117 8 31 AG4117\n",
"380117 10 3 80117\n",
"3WSC117 100 3 WSC117\n",
"52JN117 48 52 JN117\n",
"53DRM9117 13 53 DRM9117\n",
"7WSC117 200 7 WSC117"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"maytransfers=maytransfers.groupby(['SCPRODUCT']).agg({'TRANSFERRED_IN':'sum','SC':'max','PRODUCT':'max'}) \n",
"maytransfers.sort_values('SC',ascending=True)\n",
"maytransfers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Joining the data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Giving a DataFrame an index can be very useful, but also confusing in Pandas. Let's look at our table a"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"temp=maysales.merge(maytransfers.TRANSFERRED_IN, on='SCPRODUCT', how='left')"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTSOLDTRANSFERRED_IN
SCPRODUCT
14009911714009911752.0
18011718011710NaN
1K51171K51172NaN
1WSC1171WSC117100NaN
11WSC11711WSC117100NaN
15XLG11715XLG11717NaN
2801172801171016.0
20SB11720SB1172NaN
20XLG11720XLG1173NaN
3WSC1173WSC117100100.0
31AG411731AG411798.0
33WSC11733WSC117100NaN
49QZSL11749QZSL1171NaN
51JN11751JN11713NaN
52JN11752JN1173648.0
7WSC1177WSC117100200.0
81QZSL11781QZSL11719NaN
81QZS11781QZS11788NaN
9WSC1179WSC117100NaN
\n",
"
"
],
"text/plain": [
" SC PRODUCT SOLD TRANSFERRED_IN\n",
"SCPRODUCT \n",
"140099117 1 40099117 5 2.0\n",
"180117 1 80117 10 NaN\n",
"1K5117 1 K5117 2 NaN\n",
"1WSC117 1 WSC117 100 NaN\n",
"11WSC117 11 WSC117 100 NaN\n",
"15XLG117 15 XLG117 17 NaN\n",
"280117 2 80117 10 16.0\n",
"20SB117 20 SB117 2 NaN\n",
"20XLG117 20 XLG117 3 NaN\n",
"3WSC117 3 WSC117 100 100.0\n",
"31AG4117 31 AG4117 9 8.0\n",
"33WSC117 33 WSC117 100 NaN\n",
"49QZSL117 49 QZSL117 1 NaN\n",
"51JN117 51 JN117 13 NaN\n",
"52JN117 52 JN117 36 48.0\n",
"7WSC117 7 WSC117 100 200.0\n",
"81QZSL117 81 QZSL117 19 NaN\n",
"81QZS117 81 QZS117 88 NaN\n",
"9WSC117 9 WSC117 100 NaN"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"temp"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
"finaldata=temp.merge(skutable.ON_HAND, on='SCPRODUCT', how='left')"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTSOLDTRANSFERRED_INON_HAND
SCPRODUCT
14009911714009911752.0213
18011718011710NaN954
1K51171K51172NaN6
1WSC1171WSC117100NaN1300
11WSC11711WSC117100NaN300
15XLG11715XLG11717NaN0
2801172801171016.00
20SB11720SB1172NaN49
20XLG11720XLG1173NaN0
3WSC1173WSC117100100.0200
31AG411731AG411798.08
33WSC11733WSC117100NaN100
49QZSL11749QZSL1171NaN0
51JN11751JN11713NaN122
52JN11752JN1173648.023
7WSC1177WSC117100200.0200
81QZSL11781QZSL11719NaN-3
81QZS11781QZS11788NaN108
9WSC1179WSC117100NaN300
\n",
"
"
],
"text/plain": [
" SC PRODUCT SOLD TRANSFERRED_IN ON_HAND\n",
"SCPRODUCT \n",
"140099117 1 40099117 5 2.0 213\n",
"180117 1 80117 10 NaN 954\n",
"1K5117 1 K5117 2 NaN 6\n",
"1WSC117 1 WSC117 100 NaN 1300\n",
"11WSC117 11 WSC117 100 NaN 300\n",
"15XLG117 15 XLG117 17 NaN 0\n",
"280117 2 80117 10 16.0 0\n",
"20SB117 20 SB117 2 NaN 49\n",
"20XLG117 20 XLG117 3 NaN 0\n",
"3WSC117 3 WSC117 100 100.0 200\n",
"31AG4117 31 AG4117 9 8.0 8\n",
"33WSC117 33 WSC117 100 NaN 100\n",
"49QZSL117 49 QZSL117 1 NaN 0\n",
"51JN117 51 JN117 13 NaN 122\n",
"52JN117 52 JN117 36 48.0 23\n",
"7WSC117 7 WSC117 100 200.0 200\n",
"81QZSL117 81 QZSL117 19 NaN -3\n",
"81QZS117 81 QZS117 88 NaN 108\n",
"9WSC117 9 WSC117 100 NaN 300"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"finaldata"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTSOLDTRANSFERRED_INON_HAND
014009911752.0213
118011710NaN954
21K51172NaN6
31WSC117100NaN1300
411WSC117100NaN300
515XLG11717NaN0
62801171016.00
720SB1172NaN49
820XLG1173NaN0
93WSC117100100.0200
1031AG411798.08
1133WSC117100NaN100
1249QZSL1171NaN0
1351JN11713NaN122
1452JN1173648.023
157WSC117100200.0200
1681QZSL11719NaN-3
1781QZS11788NaN108
189WSC117100NaN300
\n",
"
"
],
"text/plain": [
" SC PRODUCT SOLD TRANSFERRED_IN ON_HAND\n",
"0 1 40099117 5 2.0 213\n",
"1 1 80117 10 NaN 954\n",
"2 1 K5117 2 NaN 6\n",
"3 1 WSC117 100 NaN 1300\n",
"4 11 WSC117 100 NaN 300\n",
"5 15 XLG117 17 NaN 0\n",
"6 2 80117 10 16.0 0\n",
"7 20 SB117 2 NaN 49\n",
"8 20 XLG117 3 NaN 0\n",
"9 3 WSC117 100 100.0 200\n",
"10 31 AG4117 9 8.0 8\n",
"11 33 WSC117 100 NaN 100\n",
"12 49 QZSL117 1 NaN 0\n",
"13 51 JN117 13 NaN 122\n",
"14 52 JN117 36 48.0 23\n",
"15 7 WSC117 100 200.0 200\n",
"16 81 QZSL117 19 NaN -3\n",
"17 81 QZS117 88 NaN 108\n",
"18 9 WSC117 100 NaN 300"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"finaldata.reset_index(inplace=True)\n",
"finaldata.drop(['SCPRODUCT'],axis=1,inplace=True)\n",
"finaldata"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTSOLDTRANSFERRED_INON_HAND
014009911752.0213
1180117100.0954
21K511720.06
31WSC1171000.01300
411WSC1171000.0300
515XLG117170.00
62801171016.00
720SB11720.049
820XLG11730.00
93WSC117100100.0200
1031AG411798.08
1133WSC1171000.0100
1249QZSL11710.00
1351JN117130.0122
1452JN1173648.023
157WSC117100200.0200
1681QZSL117190.0-3
1781QZS117880.0108
189WSC1171000.0300
\n",
"
"
],
"text/plain": [
" SC PRODUCT SOLD TRANSFERRED_IN ON_HAND\n",
"0 1 40099117 5 2.0 213\n",
"1 1 80117 10 0.0 954\n",
"2 1 K5117 2 0.0 6\n",
"3 1 WSC117 100 0.0 1300\n",
"4 11 WSC117 100 0.0 300\n",
"5 15 XLG117 17 0.0 0\n",
"6 2 80117 10 16.0 0\n",
"7 20 SB117 2 0.0 49\n",
"8 20 XLG117 3 0.0 0\n",
"9 3 WSC117 100 100.0 200\n",
"10 31 AG4117 9 8.0 8\n",
"11 33 WSC117 100 0.0 100\n",
"12 49 QZSL117 1 0.0 0\n",
"13 51 JN117 13 0.0 122\n",
"14 52 JN117 36 48.0 23\n",
"15 7 WSC117 100 200.0 200\n",
"16 81 QZSL117 19 0.0 -3\n",
"17 81 QZS117 88 0.0 108\n",
"18 9 WSC117 100 0.0 300"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"finaldata.TRANSFERRED_IN.fillna(0.0,inplace=True)\n",
"finaldata"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"finaldata.to_excel('finaldata.xlsx')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
homework-data-cleaning-files-ugf44p3y/Homework - Data cleaning - files/.ipynb_checkpoints/Data cleaning Zhang Mai-checkpoint.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Homework_Group"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# # Author: Yueyang Zhang, Kanghua Mai"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"import pandas as pd\n",
"import matplotlib as mpl\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"import datetime\n",
"from IPython.display import Image"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"sales=pd.read_csv('sales test.csv')\n",
"transfers=pd.read_fwf('transfers test.txt')\n",
"SKU=pd.read_csv('SKU master test.csv')"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(898, 14)"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sales.shape"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# clean unclear columns for sales data\n",
"sales = sales.iloc[:,3:14]"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Unnamed: 0.1.1.1 int64\n",
"PRODUCT_NO object\n",
"SHIP_SC object\n",
"CUSTOMER_NO object\n",
"INVOICE_ORDER_DATE object\n",
"QUANTITY int64\n",
"SELL_PRICE float64\n",
"SALES_ORDER object\n",
"ORDER_DATE object\n",
"SHIP_VIA object\n",
"SHIP_TO_ZIP object\n",
"dtype: object"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sales.dtypes"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"sales['month']=[d.split('-')[1] for d in sales['INVOICE_ORDER_DATE']] \n",
"sales['month'] = sales['month'].astype(int)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"import string\n",
"def remove_punctuations(text):\n",
" for punctuation in string.punctuation:\n",
" text = text.replace(punctuation, '')\n",
" return text\n",
"sales[\"PRODUCT_NO\"] = sales['PRODUCT_NO'].apply(remove_punctuations)\n",
"sales[\"SHIP_SC\"] = sales['SHIP_SC'].apply(remove_punctuations)\n",
"sales[\"CUSTOMER_NO\"] = sales['SHIP_SC'].apply(remove_punctuations)\n",
"sales[\"SHIP_VIA\"] = sales['SHIP_VIA'].apply(remove_punctuations)\n",
"sales[\"SHIP_TO_ZIP\"] = sales['SHIP_TO_ZIP'].apply(remove_punctuations)\n",
"sales[\"INVOICE_ORDER_DATE\"] = sales['INVOICE_ORDER_DATE'].apply(remove_punctuations)\n",
"sales[\"SALES_ORDER\"] = sales['SALES_ORDER'].apply(remove_punctuations)\n",
"sales[\"ORDER_DATE\"] = sales['ORDER_DATE'].apply(remove_punctuations)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"SKU['month']=[d.split('-')[1] for d in SKU['DATE']] \n",
"SKU['month'] = SKU['month'].astype(int)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"transfers['month']=[d.split('-')[1] for d in transfers['DATE']] \n",
"transfers['month'] = transfers['month'].astype(int)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"sales=sales[sales['month']==5]\n",
"transfers=transfers[transfers['month']==5]"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"sales['SHIP_SC']=sales.SHIP_SC.astype(int)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"join = pd.merge(sales, SKU, how='left', left_on=['SHIP_SC', 'PRODUCT_NO'], right_on=['SC','PRODUCT'])"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"transfers=transfers.groupby(['TO', 'PRODUCT']).agg({'QTY':'sum'})"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"join = pd.merge(join, transfers, how='left', left_on=['SHIP_SC', 'PRODUCT_NO'], right_on=['TO', 'PRODUCT'])"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"table = join.groupby(['SHIP_SC', 'PRODUCT_NO']).agg({'QUANTITY':'sum', 'QTY':'sum', 'QOH':'sum'})"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"table.sort_values('SHIP_SC', inplace=True)\n",
"table.reset_index(inplace=True)\n",
"table.rename(columns={'SHIP_SC':'SC','PRODUCT_NO':'PRODUCT', 'QUANTITY':'SOLD','QTY':'TRANSFERRED_IN', 'QOH':'ON_HAND'}, inplace=True)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTSOLDTRANSFERRED_INON_HAND
014009911752.0213
1180117100.0954
21K511720.06
31WSC1171000.01300
42801171016.00
53WSC117100100.0200
67WSC117100200.0200
79WSC1171000.0300
811WSC1171000.0300
915XLG117170.00
1020SB11720.098
1120XLG11730.00
1231AG4117916.016
1333WSC1171000.0100
1449QZSL11710.00
1551JN117130.0244
1652JN1173696.046
1781QZS117880.04968
1881QZSL117190.0-36
\n",
"
"
],
"text/plain": [
" SC PRODUCT SOLD TRANSFERRED_IN ON_HAND\n",
"0 1 40099117 5 2.0 213\n",
"1 1 80117 10 0.0 954\n",
"2 1 K5117 2 0.0 6\n",
"3 1 WSC117 100 0.0 1300\n",
"4 2 80117 10 16.0 0\n",
"5 3 WSC117 100 100.0 200\n",
"6 7 WSC117 100 200.0 200\n",
"7 9 WSC117 100 0.0 300\n",
"8 11 WSC117 100 0.0 300\n",
"9 15 XLG117 17 0.0 0\n",
"10 20 SB117 2 0.0 98\n",
"11 20 XLG117 3 0.0 0\n",
"12 31 AG4117 9 16.0 16\n",
"13 33 WSC117 100 0.0 100\n",
"14 49 QZSL117 1 0.0 0\n",
"15 51 JN117 13 0.0 244\n",
"16 52 JN117 36 96.0 46\n",
"17 81 QZS117 88 0.0 4968\n",
"18 81 QZSL117 19 0.0 -36"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"table"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
homework-data-cleaning-files-ugf44p3y/Homework - Data cleaning - files/.ipynb_checkpoints/Data cleansing HW1-checkpoint.ipynb
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import sys, pandas as pd, matplotlib as mpl, matplotlib.pyplot as plt, numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
SCPRODUCTQOH
010001170
110101170
210201170
310311170
4290001170
510801170
6290101170
7290201170
811101170
9290311170
101834651170
1111301170
1218400991170
13290801170
141134651170
1511311170
1611400991171
1711351170
1818801170
1911801176
20292361170
2118AG41170
222934651170
2329400991170
2411AG41170
2512361170
2629801170
2712601170
2829941170
2929A401170
............
840960101170
841960201170
842960311170
843960801170
844961101170
845961301170
846961311170
847961351170
848962361170
849962601170
8509631D011170
8519634651170
85296400991170
8539643PB231170
8549644PB311170
85596801170
85696931170
85796941170
85896A401170
85996AG41170
86096CP9981170
86196G31170
86296JN1170
86396K51170
86496QZS1170
86596QZSL1170
86696R5051170
86796RSK21170
86896RSM21170
86996WSC1170
\n",
"

870 rows × 3 columns

\n",
"
"
],
"text/plain": [
" SC PRODUCT QOH\n",
"0 1 000117 0\n",
"1 1 010117 0\n",
"2 1 020117 0\n",
"3 1 031117 0\n",
"4 29 000117 0\n",
"5 1 080117 0\n",
"6 29 010117 0\n",
"7 29 020117 0\n",
"8 1 110117 0\n",
"9 29 031117 0\n",
"10 18 3465117 0\n",
"11 1 130117 0\n",
"12 18 40099117 0\n",
"13 29 080117 0\n",
"14 11 3465117 0\n",
"15 1 131117 0\n",
"16 11 40099117 1\n",
"17 1 135117 0\n",
"18 18 80117 0\n",
"19 11 80117 6\n",
"20 29 236117 0\n",
"21 18 AG4117 0\n",
"22 29 3465117 0\n",
"23 29 40099117 0\n",
"24 11 AG4117 0\n",
"25 1 236117 0\n",
"26 29 80117 0\n",
"27 1 260117 0\n",
"28 29 94117 0\n",
"29 29 A40117 0\n",
".. .. ... ...\n",
"840 96 010117 0\n",
"841 96 020117 0\n",
"842 96 031117 0\n",
"843 96 080117 0\n",
"844 96 110117 0\n",
"845 96 130117 0\n",
"846 96 131117 0\n",
"847 96 135117 0\n",
"848 96 236117 0\n",
"849 96 260117 0\n",
"850 96 31D01117 0\n",
"851 96 3465117 0\n",
"852 96 40099117 0\n",
"853 96 43PB23117 0\n",
"854 96 44PB31117 0\n",
"855 96 80117 0\n",
"856 96 93117 0\n",
"857 96 94117 0\n",
"858 96 A40117 0\n",
"859 96 AG4117 0\n",
"860 96 CP998117 0\n",
"861 96 G3117 0\n",
"862 96 JN117 0\n",
"863 96 K5117 0\n",
"864 96 QZS117 0\n",
"865 96 QZSL117 0\n",
"866 96 R505117 0\n",
"867 96 RSK2117 0\n",
"868 96 RSM2117 0\n",
"869 96 WSC117 0\n",
"\n",
"[870 rows x 3 columns]"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#PRODUCT1\n",
"SKUmaster = pd.read_csv(\"SKU master test.csv\")\n",
"SKUmasterclean = SKUmaster[['SC', 'PRODUCT','QOH']]\n",
"SKUmasterclean"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
PRODUCTQUANTITYORDER_MONTH
03465117-37
1346511736
2346511736
3400991173010
44009911755
54009911762
640099117101
740099117202
84700000117610
94700000117210
104700000117211
114700000117212
12470000011711
138011759
148011769
15801172010
16801175011
17801171211
1880117201
1980117204
208011764
2180117105
2280117208
2380117208
2480117108
2580117259
2680117209
2780117159
2880117104
2980117105
............
868WSC1171005
869WSC11710010
870WSC1171007
871WSC11710010
872XLG117310
873XLG11769
874XLG117162
875XLG117312
876XLG11738
877XLG117-48
878XLG117175
879XLG11759
880XLG117411
881XLG11711
882XLG11712
883XLG11753
884XLG11717
885XLG11729
886XLG11749
887XLG11749
888XLG117-211
889XLG117210
890XLG117410
891XLG117212
892XLG117112
893XLG11752
894XLG11735
895XLG11716
896XLG11729
897XLG11768
\n",
"

898 rows × 3 columns

\n",
"
"
],
"text/plain": [
" PRODUCT QUANTITY ORDER_MONTH\n",
"0 3465117 -3 7\n",
"1 3465117 3 6\n",
"2 3465117 3 6\n",
"3 40099117 30 10\n",
"4 40099117 5 5\n",
"5 40099117 6 2\n",
"6 40099117 10 1\n",
"7 40099117 20 2\n",
"8 4700000117 6 10\n",
"9 4700000117 2 10\n",
"10 4700000117 2 11\n",
"11 4700000117 2 12\n",
"12 4700000117 1 1\n",
"13 80117 5 9\n",
"14 80117 6 9\n",
"15 80117 20 10\n",
"16 80117 50 11\n",
"17 80117 12 11\n",
"18 80117 20 1\n",
"19 80117 20 4\n",
"20 80117 6 4\n",
"21 80117 10 5\n",
"22 80117 20 8\n",
"23 80117 20 8\n",
"24 80117 10 8\n",
"25 80117 25 9\n",
"26 80117 20 9\n",
"27 80117 15 9\n",
"28 80117 10 4\n",
"29 80117 10 5\n",
".. ... ... ...\n",
"868 WSC117 100 5\n",
"869 WSC117 100 10\n",
"870 WSC117 100 7\n",
"871 WSC117 100 10\n",
"872 XLG117 3 10\n",
"873 XLG117 6 9\n",
"874 XLG117 16 2\n",
"875 XLG117 3 12\n",
"876 XLG117 3 8\n",
"877 XLG117 -4 8\n",
"878 XLG117 17 5\n",
"879 XLG117 5 9\n",
"880 XLG117 4 11\n",
"881 XLG117 1 1\n",
"882 XLG117 1 2\n",
"883 XLG117 5 3\n",
"884 XLG117 1 7\n",
"885 XLG117 2 9\n",
"886 XLG117 4 9\n",
"887 XLG117 4 9\n",
"888 XLG117 -2 11\n",
"889 XLG117 2 10\n",
"890 XLG117 4 10\n",
"891 XLG117 2 12\n",
"892 XLG117 1 12\n",
"893 XLG117 5 2\n",
"894 XLG117 3 5\n",
"895 XLG117 1 6\n",
"896 XLG117 2 9\n",
"897 XLG117 6 8\n",
"\n",
"[898 rows x 3 columns]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#PRODUCT2\n",
"SKUsales = pd.read_csv(\"sales test.csv\")\n",
"SKUsales.rename(columns={'PRODUCT_NO':'PRODUCT'}, inplace = True)\n",
"SKUsales['PRODUCT'] = SKUsales['PRODUCT'].map(lambda x: x.lstrip('=\"').rstrip('\"'))\n",
"SKUsales['INVOICE_ORDER_DATE'] = SKUsales['INVOICE_ORDER_DATE'].map(lambda x: x.lstrip('=\"').rstrip('\"'))\n",
"SKUsales['ORDER_MONTH'] = pd.DatetimeIndex(SKUsales['INVOICE_ORDER_DATE']).month\n",
"SKUsalesclean = SKUsales[['PRODUCT', 'QUANTITY','ORDER_MONTH']]\n",
"SKUsalesclean"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
PRODUCTQTYSHIP_MONTHTO
040099117251
180117852
280117852
3WSC11710012
4801171013
5801171053
6WSC11720013
7WSC11710053
8WSC11710063
9WSC11710063
10WSC11710083
11SB1171124
124009911710125
13WSC117100105
14WSC117100115
15WSC11710015
16WSC11710075
17WSC11710085
18XLG1177125
19XLG117915
20RSK2117116
21WSC117200106
22WSC11710036
23WSC11710046
24WSC11710046
25WSC11720066
26WSC11730076
27XLG117346
28XLG117376
29WSC11710027
...............
91XLG1173721
92XLG1172821
93WSC117100922
94SB11711022
95SB11711122
96SB11711122
97SB1171822
98SB1171822
99XLG1173522
100XLG1173622
101AG4117121131
102AG41175231
103AG411710431
104AG41178531
105AG411712631
106G31171431
107WSC117100932
108K511711233
109WSC1171001134
110JN117241052
111JN117241152
112JN11748152
113JN11748552
114DRM911730153
115JN11712653
116DRM911713553
117WSC117100102
118K511741016
119SB11711016
120WSC1171001022
\n",
"

121 rows × 4 columns

\n",
"
"
],
"text/plain": [
" PRODUCT QTY SHIP_MONTH TO\n",
"0 40099117 2 5 1\n",
"1 80117 8 5 2\n",
"2 80117 8 5 2\n",
"3 WSC117 100 1 2\n",
"4 80117 10 1 3\n",
"5 80117 10 5 3\n",
"6 WSC117 200 1 3\n",
"7 WSC117 100 5 3\n",
"8 WSC117 100 6 3\n",
"9 WSC117 100 6 3\n",
"10 WSC117 100 8 3\n",
"11 SB117 1 12 4\n",
"12 40099117 10 12 5\n",
"13 WSC117 100 10 5\n",
"14 WSC117 100 11 5\n",
"15 WSC117 100 1 5\n",
"16 WSC117 100 7 5\n",
"17 WSC117 100 8 5\n",
"18 XLG117 7 12 5\n",
"19 XLG117 9 1 5\n",
"20 RSK2117 1 1 6\n",
"21 WSC117 200 10 6\n",
"22 WSC117 100 3 6\n",
"23 WSC117 100 4 6\n",
"24 WSC117 100 4 6\n",
"25 WSC117 200 6 6\n",
"26 WSC117 300 7 6\n",
"27 XLG117 3 4 6\n",
"28 XLG117 3 7 6\n",
"29 WSC117 100 2 7\n",
".. ... ... ... ..\n",
"91 XLG117 3 7 21\n",
"92 XLG117 2 8 21\n",
"93 WSC117 100 9 22\n",
"94 SB117 1 10 22\n",
"95 SB117 1 11 22\n",
"96 SB117 1 11 22\n",
"97 SB117 1 8 22\n",
"98 SB117 1 8 22\n",
"99 XLG117 3 5 22\n",
"100 XLG117 3 6 22\n",
"101 AG4117 12 11 31\n",
"102 AG4117 5 2 31\n",
"103 AG4117 10 4 31\n",
"104 AG4117 8 5 31\n",
"105 AG4117 12 6 31\n",
"106 G3117 1 4 31\n",
"107 WSC117 100 9 32\n",
"108 K5117 1 12 33\n",
"109 WSC117 100 11 34\n",
"110 JN117 24 10 52\n",
"111 JN117 24 11 52\n",
"112 JN117 48 1 52\n",
"113 JN117 48 5 52\n",
"114 DRM9117 30 1 53\n",
"115 JN117 12 6 53\n",
"116 DRM9117 13 5 53\n",
"117 WSC117 100 10 2\n",
"118 K5117 4 10 16\n",
"119 SB117 1 10 16\n",
"120 WSC117 100 10 22\n",
"\n",
"[121 rows x 4 columns]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#PRODUCT3\n",
"SKUtransfers = pd.read_fwf('transfers test.txt') #fwf is fixed fit format\n",
"SKUtransfers['SHIP_MONTH'] = pd.DatetimeIndex(SKUtransfers['DATE']).month #change column name DATE to SHIP MONTH\n",
"SKUtransfersclean = SKUtransfers[['PRODUCT','QTY','SHIP_MONTH','TO']]\n",
"SKUtransfersclean"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"
PRODUCTQTYSHIP_MONTHTOSCQOH
04009911725118.00.0
14009911725111.01.0
24009911725129.00.0
3400991172511.0213.0
44009911725131.00.0
54009911725112.00.0
64009911725120.00.0
7400991172512.00.0
84009911725132.00.0
94009911725113.00.0
10400991172513.00.0
114009911725121.00.0
124009911725133.00.0
134009911725114.00.0
14400991172514.00.0
154009911725122.00.0
164009911725134.00.0
174009911725115.00.0
18400991172515.00.0
194009911725135.00.0
204009911725116.00.0
21400991172516.00.0
224009911725143.00.0
23400991172517.00.0
244009911725144.00.0
254009911725145.00.0
26400991172518.00.0
274009911725148.00.0
28400991172519.00.0
294009911725149.00.0
.....................
4150WSC117100102213.00.0
4151WSC11710010223.0200.0
4152WSC117100102221.00.0
4153WSC117100102233.0100.0
4154WSC117100102214.00.0
4155WSC11710010224.00.0
4156WSC117100102234.00.0
4157WSC117100102222.00.0
4158WSC117100102215.00.0
4159WSC11710010225.0100.0
4160WSC117100102235.00.0
4161WSC117100102216.00.0
4162WSC11710010226.0200.0
4163WSC117100102243.00.0
4164WSC117100102244.00.0
4165WSC11710010227.0200.0
4166WSC117100102245.00.0
4167WSC11710010228.00.0
4168WSC117100102248.00.0
4169WSC117100102249.00.0
4170WSC11710010229.0300.0
4171WSC117100102251.0100.0
4172WSC117100102252.00.0
4173WSC117100102210.00.0
4174WSC117100102253.00.0
4175WSC117100102281.00.0
4176WSC117100102282.00.0
4177WSC117100102286.00.0
4178WSC117100102291.00.0
4179WSC117100102296.00.0
\n",
"

4180 rows × 6 columns

\n",
"
"
],
"text/plain": [
" PRODUCT QTY SHIP_MONTH TO SC QOH\n",
"0 40099117 2 5 1 18.0 0.0\n",
"1 40099117 2 5 1 11.0 1.0\n",
"2 40099117 2 5 1 29.0 0.0\n",
"3 40099117 2 5 1 1.0 213.0\n",
"4 40099117 2 5 1 31.0 0.0\n",
"5 40099117 2 5 1 12.0 0.0\n",
"6 40099117 2 5 1 20.0 0.0\n",
"7 40099117 2 5 1 2.0 0.0\n",
"8 40099117 2 5 1 32.0 0.0\n",
"9 40099117 2 5 1 13.0 0.0\n",
"10 40099117 2 5 1 3.0 0.0\n",
"11 40099117 2 5 1 21.0 0.0\n",
"12 40099117 2 5 1 33.0 0.0\n",
"13 40099117 2 5 1 14.0 0.0\n",
"14 40099117 2 5 1 4.0 0.0\n",
"15 40099117 2 5 1 22.0 0.0\n",
"16 40099117 2 5 1 34.0 0.0\n",
"17 40099117 2 5 1 15.0 0.0\n",
"18 40099117 2 5 1 5.0 0.0\n",
"19 40099117 2 5 1 35.0 0.0\n",
"20 40099117 2 5 1 16.0 0.0\n",
"21 40099117 2 5 1 6.0 0.0\n",
"22 40099117 2 5 1 43.0 0.0\n",
"23 40099117 2 5 1 7.0 0.0\n",
"24 40099117 2 5 1 44.0 0.0\n",
"25 40099117 2 5 1 45.0 0.0\n",
"26 40099117 2 5 1 8.0 0.0\n",
"27 40099117 2 5 1 48.0 0.0\n",
"28 40099117 2 5 1 9.0 0.0\n",
"29 40099117 2 5 1 49.0 0.0\n",
"... ... ... ... .. ... ...\n",
"4150 WSC117 100 10 22 13.0 0.0\n",
"4151 WSC117 100 10 22 3.0 200.0\n",
"4152 WSC117 100 10 22 21.0 0.0\n",
"4153 WSC117 100 10 22 33.0 100.0\n",
"4154 WSC117 100 10 22 14.0 0.0\n",
"4155 WSC117 100 10 22 4.0 0.0\n",
"4156 WSC117 100 10 22 34.0 0.0\n",
"4157 WSC117 100 10 22 22.0 0.0\n",
"4158 WSC117 100 10 22 15.0 0.0\n",
"4159 WSC117 100 10 22 5.0 100.0\n",
"4160 WSC117 100 10 22 35.0 0.0\n",
"4161 WSC117 100 10 22 16.0 0.0\n",
"4162 WSC117 100 10 22 6.0 200.0\n",
"4163 WSC117 100 10 22 43.0 0.0\n",
"4164 WSC117 100 10 22 44.0 0.0\n",
"4165 WSC117 100 10 22 7.0 200.0\n",
"4166 WSC117 100 10 22 45.0 0.0\n",
"4167 WSC117 100 10 22 8.0 0.0\n",
"4168 WSC117 100 10 22 48.0 0.0\n",
"4169 WSC117 100 10 22 49.0 0.0\n",
"4170 WSC117 100 10 22 9.0 300.0\n",
"4171 WSC117 100 10 22 51.0 100.0\n",
"4172 WSC117 100 10 22 52.0 0.0\n",
"4173 WSC117 100 10 22 10.0 0.0\n",
"4174 WSC117 100 10 22 53.0 0.0\n",
"4175 WSC117 100 10 22 81.0 0.0\n",
"4176 WSC117 100 10 22 82.0 0.0\n",
"4177 WSC117 100 10 22 86.0 0.0\n",
"4178 WSC117 100 10 22 91.0 0.0\n",
"4179 WSC117 100 10 22 96.0 0.0\n",
"\n",
"[4180 rows x 6 columns]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"MERGEmastertrans=pd.merge(SKUtransfersclean, SKUmasterclean, how='left', on='PRODUCT')\n",
"MERGEmastertrans"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here
PRODUCTQTYTOSCQOHQUANTITYORDER_MONTH
3640099117212.00.05.05.0
39980117822.00.010.05.0
40780117822.00.010.05.0
149180117822.00.010.05.0
149980117822.00.010.05.0
2968WSC11710022.05.0100.05.0
2978WSC11710022.05.0100.05.0
3003WSC11710022.05.0100.05.0
3017WSC11710022.05.0100.05.0
3029WSC11710022.05.0100.05.0
3047WSC11710022.05.0100.05.0
5859801171032.00.010.05.0
5867801171032.00.010.05.0
6951801171032.00.010.05.0
6959801171032.00.010.05.0
8428WSC11720032.05.0100.05.0
8438WSC11720032.05.0100.05.0
8463WSC11720032.05.0100.05.0
8477WSC11720032.05.0100.05.0
8489WSC11720032.05.0100.05.0
8507WSC11720032.05.0100.05.0
11704WSC11710032.05.0100.05.0
11714WSC11710032.05.0100.05.0
11739WSC11710032.05.0100.05.0
11753WSC11710032.05.0100.05.0
11765WSC11710032.05.0100.05.0
11783WSC11710032.05.0100.05.0
14980WSC11710032.05.0100.05.0
14990WSC11710032.05.0100.05.0
15015WSC11710032.05.0100.05.0
........................
189474JN11724522.00.01.05.0
189485JN11724522.00.012.05.0
189486JN11724522.00.024.05.0
190313JN11748522.00.012.05.0
190314JN11748522.00.01.05.0
190325JN11748522.00.012.05.0
190326JN11748522.00.024.05.0
191153JN11748522.00.012.05.0
191154JN11748522.00.01.05.0
191165JN11748522.00.012.05.0
191166JN11748522.00.024.05.0