{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading Dataframe\n",
      "creating new folder 16.3.2020\n",
      "Analysing dump data & defining scope\n",
      "Capturing today's Scope Data\n",
      "creating folder product: 1\n",
      "creating folder product: 2\n",
      "creating folder product: 3\n",
      "creating folder product: 4\n",
      "creating folder product: 5\n",
      "creating folder product: 6\n",
      "creating folder product: 7\n",
      "creating folder product: 8\n",
      "creating folder product: 9\n",
      "creating folder product: 10\n",
      "creating folder product: 11\n",
      "creating folder product: 12\n",
      "creating folder product: 13\n",
      "creating folder product: 14\n",
      "creating folder product: 15\n",
      "creating folder product: 16\n",
      "creating folder product: 17\n",
      "creating folder product: 18\n",
      "creating folder product: 19\n",
      "creating folder product: 20\n",
      "creating folder product: 21\n",
      "creating folder product: 22\n",
      "creating folder product: 23\n",
      "creating folder product: 24\n",
      "creating folder product: 25\n",
      "creating folder product: 26\n",
      "creating folder product: 27\n",
      "creating folder product: 28\n",
      "creating folder product: 29\n",
      "creating folder product: 30\n",
      "creating folder product: 31\n",
      "creating folder product: 32\n",
      "creating folder product: 33\n",
      "creating folder product: 34\n",
      "creating folder product: 35\n",
      "creating folder product: 36\n",
      "creating folder product: 37\n",
      "creating folder product: 38\n",
      "creating folder product: 39\n",
      "creating folder product: 40\n",
      "creating folder product: 41\n",
      "creating folder product: 42\n",
      "creating folder product: 43\n",
      "creating folder product: 44\n",
      "creating folder product: 45\n",
      "creating folder product: 46\n",
      "creating folder product: 47\n",
      "creating folder product: 48\n",
      "creating folder product: 49\n",
      "creating folder product: 50\n",
      "creating folder product: 51\n",
      "creating folder product: 52\n",
      "creating folder product: 53\n",
      "creating folder product: 54\n",
      "creating folder product: 55\n",
      "creating folder product: 56\n",
      "creating folder product: 57\n",
      "creating folder product: 58\n",
      "creating folder product: 59\n",
      "creating folder product: 60\n",
      "creating folder product: 61\n",
      "creating folder product: 62\n",
      "creating folder product: 63\n",
      "creating folder product: 64\n",
      "creating folder product: 65\n",
      "creating folder product: 66\n",
      "creating folder product: 67\n",
      "creating folder product: 68\n",
      "creating folder product: 69\n",
      "creating folder product: 70\n",
      "creating folder product: 71\n",
      "creating folder product: 72\n",
      "creating folder product: 73\n",
      "creating folder product: 74\n",
      "creating folder product: 75\n",
      "creating folder product: 76\n",
      "creating folder product: 77\n",
      "creating folder product: 78\n",
      "creating folder product: 79\n",
      "creating folder product: 80\n",
      "creating folder product: 81\n",
      "creating folder product: 82\n",
      "creating folder product: 83\n",
      "creating folder product: 84\n",
      "creating folder product: 85\n",
      "creating folder product: 86\n",
      "creating folder product: 87\n",
      "creating folder product: 88\n",
      "creating folder product: 89\n",
      "creating folder product: 90\n",
      "creating folder product: 91\n",
      "creating folder product: 92\n",
      "creating folder product: 93\n",
      "creating folder product: 94\n",
      "creating folder product: 95\n",
      "creating folder product: 96\n",
      "creating folder product: 97\n",
      "creating folder product: 98\n",
      "creating folder product: 99\n",
      "creating folder product: 100\n",
      "creating folder product: 101\n",
      "creating folder product: 102\n",
      "creating folder product: 103\n",
      "creating folder product: 104\n",
      "creating folder product: 105\n",
      "creating folder product: 106\n",
      "creating folder product: 107\n",
      "creating folder product: 108\n",
      "creating folder product: 109\n",
      "creating folder product: 110\n",
      "creating folder product: 111\n",
      "creating folder product: 112\n",
      "creating folder product: 113\n",
      "creating folder product: 114\n",
      "creating folder product: 115\n",
      "creating folder product: 116\n",
      "creating folder product: 117\n",
      "creating folder product: 118\n",
      "creating folder product: 119\n",
      "creating folder product: 120\n",
      "creating folder product: 121\n",
      "creating folder product: 122\n",
      "creating folder product: 123\n",
      "creating folder product: 124\n",
      "creating folder product: 125\n",
      "creating folder product: 126\n",
      "creating folder product: 127\n",
      "creating folder product: 128\n",
      "creating folder product: 129\n",
      "creating folder product: 130\n",
      "creating folder product: 131\n",
      "creating folder product: 132\n",
      "creating folder product: 133\n",
      "creating folder product: 134\n",
      "creating folder product: 135\n",
      "creating folder product: 136\n",
      "creating folder product: 137\n",
      "creating folder product: 138\n",
      "creating folder product: 139\n",
      "creating folder product: 140\n",
      "creating folder product: 141\n",
      "creating folder product: 142\n",
      "creating folder product: 143\n",
      "creating folder product: 144\n",
      "creating folder product: 145\n",
      "creating folder product: 146\n",
      "creating folder product: 147\n",
      "creating folder product: 148\n",
      "creating folder product: 149\n",
      "creating folder product: 150\n",
      "creating folder product: 151\n",
      "creating folder product: 152\n",
      "creating folder product: 153\n",
      "creating folder product: 154\n",
      "creating folder product: 155\n",
      "creating folder product: 156\n",
      "creating folder product: 157\n",
      "creating folder product: 158\n",
      "creating folder product: 159\n",
      "creating folder product: 160\n",
      "creating folder product: 161\n",
      "creating folder product: 162\n",
      "creating folder product: 163\n",
      "creating folder product: 164\n",
      "creating folder product: 165\n",
      "creating folder product: 166\n",
      "creating folder product: 167\n",
      "creating folder product: 168\n",
      "creating folder product: 169\n",
      "creating folder product: 170\n",
      "creating folder product: 171\n",
      "creating folder product: 172\n",
      "creating folder product: 173\n",
      "creating folder product: 174\n",
      "creating folder product: 175\n",
      "creating folder product: 176\n",
      "creating folder product: 177\n",
      "creating folder product: 178\n",
      "creating folder product: 179\n",
      "creating folder product: 180\n",
      "creating folder product: 181\n",
      "creating folder product: 182\n",
      "creating folder product: 183\n",
      "creating folder product: 184\n",
      "creating folder product: 185\n",
      "creating folder product: 186\n",
      "creating folder product: 187\n",
      "creating folder product: 188\n",
      "creating folder product: 189\n",
      "creating folder product: 190\n",
      "creating folder product: 191\n",
      "creating folder product: 192\n",
      "creating folder product: 193\n",
      "creating folder product: 194\n",
      "creating folder product: 195\n",
      "creating folder product: 196\n",
      "creating folder product: 197\n",
      "creating folder product: 198\n",
      "creating folder product: 199\n",
      "creating folder product: 200\n",
      "creating folder product: 201\n",
      "creating folder product: 202\n",
      "creating folder product: 203\n",
      "creating folder product: 204\n",
      "creating folder product: 205\n",
      "creating folder product: 206\n",
      "creating folder product: 207\n",
      "creating folder product: 208\n",
      "creating folder product: 209\n",
      "creating folder product: 210\n",
      "creating folder product: 211\n",
      "creating folder product: 212\n",
      "creating folder product: 213\n",
      "creating folder product: 214\n",
      "creating folder product: 215\n",
      "creating folder product: 216\n",
      "creating folder product: 217\n",
      "creating folder product: 218\n",
      "creating folder product: 219\n",
      "creating folder product: 220\n",
      "creating folder product: 221\n",
      "creating folder product: 222\n",
      "creating folder product: 223\n",
      "creating folder product: 224\n",
      "creating folder product: 225\n",
      "creating folder product: 226\n",
      "creating folder product: 227\n",
      "creating folder product: 228\n",
      "creating folder product: 229\n",
      "creating folder product: 230\n",
      "creating folder product: 231\n",
      "creating folder product: 232\n",
      "creating folder product: 233\n",
      "creating folder product: 234\n",
      "creating folder product: 235\n",
      "creating folder product: 236\n",
      "creating folder product: 237\n",
      "creating folder product: 238\n",
      "creating folder product: 239\n",
      "creating folder product: 240\n",
      "creating folder product: 241\n",
      "creating folder product: 242\n",
      "creating folder product: 243\n",
      "creating folder product: 244\n",
      "creating folder product: 245\n",
      "creating folder product: 246\n",
      "creating folder product: 247\n",
      "creating folder product: 248\n",
      "creating folder product: 249\n",
      "creating folder product: 250\n",
      "creating folder product: 251\n",
      "creating folder product: 252\n",
      "creating folder product: 253\n",
      "creating folder product: 254\n",
      "creating folder product: 255\n",
      "creating folder product: 256\n",
      "creating folder product: 257\n",
      "creating folder product: 258\n",
      "creating folder product: 259\n",
      "creating folder product: 260\n",
      "creating folder product: 261\n",
      "creating folder product: 262\n",
      "creating folder product: 263\n",
      "creating folder product: 264\n",
      "creating folder product: 265\n",
      "creating folder product: 266\n",
      "creating folder product: 267\n",
      "creating folder product: 268\n",
      "creating folder product: 269\n",
      "creating folder product: 270\n",
      "creating folder product: 271\n",
      "creating folder product: 272\n",
      "creating folder product: 273\n",
      "creating folder product: 274\n",
      "creating folder product: 275\n",
      "creating folder product: 276\n",
      "creating folder product: 277\n",
      "creating folder product: 278\n",
      "creating folder product: 279\n",
      "creating folder product: 280\n",
      "creating folder product: 281\n",
      "creating folder product: 282\n",
      "creating folder product: 283\n",
      "creating folder product: 284\n",
      "creating folder product: 285\n",
      "creating folder product: 286\n",
      "creating folder product: 287\n",
      "creating folder product: 288\n",
      "creating folder product: 289\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "creating folder product: 290\n",
      "creating folder product: 291\n",
      "creating folder product: 292\n",
      "creating folder product: 293\n",
      "creating folder product: 294\n",
      "creating folder product: 295\n",
      "creating folder product: 296\n",
      "creating folder product: 297\n",
      "creating folder product: 298\n",
      "creating folder product: 299\n",
      "creating folder product: 300\n",
      "creating folder product: 301\n",
      "creating folder product: 302\n",
      "creating folder product: 303\n",
      "creating folder product: 304\n",
      "creating folder product: 305\n",
      "creating folder product: 306\n",
      "creating folder product: 307\n",
      "creating folder product: 308\n",
      "creating folder product: 309\n",
      "creating folder product: 310\n",
      "creating folder product: 311\n",
      "creating folder product: 312\n",
      "creating folder product: 313\n",
      "creating folder product: 314\n",
      "creating folder product: 315\n",
      "creating folder product: 316\n",
      "creating folder product: 317\n",
      "creating folder product: 318\n",
      "creating folder product: 319\n",
      "creating folder product: 320\n",
      "creating folder product: 321\n",
      "creating folder product: 322\n",
      "creating folder product: 323\n",
      "creating folder product: 324\n",
      "creating folder product: 325\n",
      "creating folder product: 326\n",
      "creating folder product: 327\n",
      "creating folder product: 328\n",
      "creating folder product: 329\n",
      "creating folder product: 330\n",
      "creating folder product: 331\n",
      "creating folder product: 332\n",
      "creating folder product: 333\n",
      "creating folder product: 334\n",
      "creating folder product: 335\n",
      "creating folder product: 336\n",
      "creating folder product: 337\n",
      "creating folder product: 338\n",
      "creating folder product: 339\n",
      "creating folder product: 340\n",
      "creating folder product: 341\n",
      "creating folder product: 342\n",
      "creating folder product: 343\n",
      "creating folder product: 344\n",
      "creating folder product: 345\n",
      "creating folder product: 346\n",
      "creating folder product: 347\n",
      "creating folder product: 348\n",
      "creating folder product: 349\n",
      "creating folder product: 350\n",
      "creating folder product: 351\n",
      "creating folder product: 352\n",
      "creating folder product: 353\n",
      "creating folder product: 354\n",
      "creating folder product: 355\n",
      "creating folder product: 356\n",
      "creating folder product: 357\n",
      "creating folder product: 358\n",
      "creating folder product: 359\n",
      "creating folder product: 360\n",
      "creating folder product: 361\n",
      "creating folder product: 362\n",
      "creating folder product: 363\n",
      "creating folder product: 364\n",
      "creating folder product: 365\n",
      "creating folder product: 366\n",
      "creating folder product: 367\n",
      "creating folder product: 368\n",
      "creating folder product: 369\n",
      "creating folder product: 370\n",
      "creating folder product: 371\n",
      "creating folder product: 372\n",
      "creating folder product: 373\n",
      "creating folder product: 374\n",
      "creating folder product: 375\n",
      "creating folder product: 376\n",
      "creating folder product: 377\n",
      "creating folder product: 378\n",
      "creating folder product: 379\n",
      "creating folder product: 380\n",
      "creating folder product: 381\n",
      "creating folder product: 382\n",
      "creating folder product: 383\n",
      "creating folder product: 384\n",
      "creating folder product: 385\n",
      "creating folder product: 386\n",
      "creating folder product: 387\n",
      "creating folder product: 388\n",
      "creating folder product: 389\n",
      "creating folder product: 390\n",
      "creating folder product: 391\n",
      "creating folder product: 392\n",
      "creating folder product: 393\n",
      "creating folder product: 394\n",
      "creating folder product: 395\n",
      "creating folder product: 396\n",
      "creating folder product: 397\n",
      "creating folder product: 398\n",
      "creating folder product: 399\n",
      "creating folder product: 400\n",
      "creating folder product: 401\n",
      "creating folder product: 402\n",
      "creating folder product: 403\n",
      "creating folder product: 404\n",
      "creating folder product: 405\n",
      "creating folder product: 406\n",
      "creating folder product: 407\n",
      "creating folder product: 408\n",
      "creating folder product: 409\n",
      "creating folder product: 410\n",
      "creating folder product: 411\n",
      "creating folder product: 412\n",
      "creating folder product: 413\n",
      "creating folder product: 414\n",
      "creating folder product: 415\n",
      "creating folder product: 416\n",
      "creating folder product: 417\n",
      "creating folder product: 418\n",
      "creating folder product: 419\n",
      "creating folder product: 420\n",
      "creating folder product: 421\n",
      "creating folder product: 422\n",
      "creating folder product: 423\n",
      "creating folder product: 424\n",
      "creating folder product: 425\n",
      "creating folder product: 426\n",
      "creating folder product: 427\n",
      "creating folder product: 428\n",
      "creating folder product: 429\n",
      "creating folder product: 430\n",
      "creating folder product: 431\n",
      "creating folder product: 432\n",
      "creating folder product: 433\n",
      "creating folder product: 434\n",
      "creating folder product: 435\n",
      "creating folder product: 436\n",
      "creating folder product: 437\n",
      "creating folder product: 438\n",
      "creating folder product: 439\n",
      "creating folder product: 440\n",
      "creating folder product: 441\n",
      "creating folder product: 442\n",
      "creating folder product: 443\n",
      "creating folder product: 444\n",
      "creating folder product: 445\n",
      "creating folder product: 446\n",
      "creating folder product: 447\n",
      "creating folder product: 448\n",
      "creating folder product: 449\n",
      "creating folder product: 450\n",
      "creating folder product: 451\n",
      "creating folder product: 452\n",
      "creating folder product: 453\n",
      "creating folder product: 454\n",
      "creating folder product: 455\n",
      "creating folder product: 456\n",
      "creating folder product: 457\n",
      "creating folder product: 458\n",
      "creating folder product: 459\n",
      "creating folder product: 460\n",
      "creating folder product: 461\n",
      "creating folder product: 462\n",
      "creating folder product: 463\n",
      "creating folder product: 464\n",
      "creating folder product: 465\n",
      "creating folder product: 466\n",
      "creating folder product: 467\n",
      "creating folder product: 468\n",
      "creating folder product: 469\n",
      "creating folder product: 470\n",
      "creating folder product: 471\n",
      "creating folder product: 472\n",
      "creating folder product: 473\n",
      "creating folder product: 474\n",
      "creating folder product: 475\n",
      "creating folder product: 476\n",
      "creating folder product: 477\n",
      "creating folder product: 478\n",
      "creating folder product: 479\n",
      "creating folder product: 480\n",
      "creating folder product: 481\n",
      "creating folder product: 482\n",
      "creating folder product: 483\n",
      "creating folder product: 484\n",
      "creating folder product: 485\n",
      "creating folder product: 486\n",
      "creating folder product: 487\n",
      "creating folder product: 488\n",
      "creating folder product: 489\n",
      "creating folder product: 490\n",
      "creating folder product: 491\n",
      "creating folder product: 492\n",
      "creating folder product: 493\n",
      "creating folder product: 494\n",
      "creating folder product: 495\n",
      "creating folder product: 496\n",
      "creating folder product: 497\n",
      "creating folder product: 498\n",
      "creating folder product: 499\n",
      "Scope identification & Directory structure creation completed\n",
      "Release check of non-standard\n",
      "Decision status: Identified Non-Standard Decision items\n",
      "Release status: Identified Mainstream & Deprecated Releases\n",
      "Release check of Others\n",
      "product1: has Mainstream or Deprecated items or else it is non-standard\n",
      "product2: has Mainstream or Deprecated items or else it is non-standard\n",
      "product4: has Mainstream or Deprecated items or else it is non-standard\n",
      "product5: has Mainstream or Deprecated items or else it is non-standard\n",
      "product6: identified highest obsolete\n",
      "product7: has Mainstream or Deprecated items or else it is non-standard\n",
      "product8: has Mainstream or Deprecated items or else it is non-standard\n",
      "product9: identified highest obsolete\n",
      "product10: has Mainstream or Deprecated items or else it is non-standard\n",
      "product11: has Mainstream or Deprecated items or else it is non-standard\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\91805\\Anaconda3\\lib\\site-packages\\pandas\\core\\indexing.py:494: 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/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  self.obj[item] = s\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "product12: has Mainstream or Deprecated items or else it is non-standard\n",
      "product13: has Mainstream or Deprecated items or else it is non-standard\n",
      "product16: has Mainstream or Deprecated items or else it is non-standard\n",
      "product17: has Mainstream or Deprecated items or else it is non-standard\n",
      "product20: has Mainstream or Deprecated items or else it is non-standard\n",
      "product21: has Mainstream or Deprecated items or else it is non-standard\n",
      "product22: has Mainstream or Deprecated items or else it is non-standard\n",
      "product25: has Mainstream or Deprecated items or else it is non-standard\n",
      "product26: has Mainstream or Deprecated items or else it is non-standard\n",
      "product29: has Mainstream or Deprecated items or else it is non-standard\n",
      "product30: has Mainstream or Deprecated items or else it is non-standard\n",
      "product31: has Mainstream or Deprecated items or else it is non-standard\n",
      "product34: has Mainstream or Deprecated items or else it is non-standard\n",
      "product35: has Mainstream or Deprecated items or else it is non-standard\n",
      "product38: has Mainstream or Deprecated items or else it is non-standard\n",
      "product39: has Mainstream or Deprecated items or else it is non-standard\n",
      "product40: has Mainstream or Deprecated items or else it is non-standard\n",
      "product43: has Mainstream or Deprecated items or else it is non-standard\n",
      "product44: has Mainstream or Deprecated items or else it is non-standard\n",
      "product47: has Mainstream or Deprecated items or else it is non-standard\n",
      "product48: has Mainstream or Deprecated items or else it is non-standard\n",
      "product49: has Mainstream or Deprecated items or else it is non-standard\n",
      "product52: has Mainstream or Deprecated items or else it is non-standard\n",
      "product53: has Mainstream or Deprecated items or else it is non-standard\n",
      "product56: has Mainstream or Deprecated items or else it is non-standard\n",
      "product57: has Mainstream or Deprecated items or else it is non-standard\n",
      "product58: has Mainstream or Deprecated items or else it is non-standard\n",
      "product61: has Mainstream or Deprecated items or else it is non-standard\n",
      "product62: has Mainstream or Deprecated items or else it is non-standard\n",
      "product65: has Mainstream or Deprecated items or else it is non-standard\n",
      "product66: has Mainstream or Deprecated items or else it is non-standard\n",
      "product67: has Mainstream or Deprecated items or else it is non-standard\n",
      "product70: has Mainstream or Deprecated items or else it is non-standard\n",
      "product71: has Mainstream or Deprecated items or else it is non-standard\n",
      "product74: has Mainstream or Deprecated items or else it is non-standard\n",
      "product75: has Mainstream or Deprecated items or else it is non-standard\n",
      "product76: has Mainstream or Deprecated items or else it is non-standard\n",
      "product79: has Mainstream or Deprecated items or else it is non-standard\n",
      "product80: has Mainstream or Deprecated items or else it is non-standard\n",
      "product83: has Mainstream or Deprecated items or else it is non-standard\n",
      "product84: has Mainstream or Deprecated items or else it is non-standard\n",
      "product85: has Mainstream or Deprecated items or else it is non-standard\n",
      "product88: has Mainstream or Deprecated items or else it is non-standard\n",
      "product89: has Mainstream or Deprecated items or else it is non-standard\n",
      "product92: has Mainstream or Deprecated items or else it is non-standard\n",
      "product93: has Mainstream or Deprecated items or else it is non-standard\n",
      "product94: has Mainstream or Deprecated items or else it is non-standard\n",
      "product97: has Mainstream or Deprecated items or else it is non-standard\n",
      "product98: has Mainstream or Deprecated items or else it is non-standard\n",
      "product101: has Mainstream or Deprecated items or else it is non-standard\n",
      "product102: has Mainstream or Deprecated items or else it is non-standard\n",
      "product103: has Mainstream or Deprecated items or else it is non-standard\n",
      "product106: has Mainstream or Deprecated items or else it is non-standard\n",
      "product107: has Mainstream or Deprecated items or else it is non-standard\n",
      "product110: has Mainstream or Deprecated items or else it is non-standard\n",
      "product111: has Mainstream or Deprecated items or else it is non-standard\n",
      "product112: has Mainstream or Deprecated items or else it is non-standard\n",
      "product115: has Mainstream or Deprecated items or else it is non-standard\n",
      "product116: has Mainstream or Deprecated items or else it is non-standard\n",
      "product119: has Mainstream or Deprecated items or else it is non-standard\n",
      "product120: has Mainstream or Deprecated items or else it is non-standard\n",
      "product121: has Mainstream or Deprecated items or else it is non-standard\n",
      "product124: has Mainstream or Deprecated items or else it is non-standard\n",
      "product125: has Mainstream or Deprecated items or else it is non-standard\n",
      "product126: has Mainstream or Deprecated items or else it is non-standard\n",
      "product128: has Mainstream or Deprecated items or else it is non-standard\n",
      "product129: has Mainstream or Deprecated items or else it is non-standard\n",
      "product130: has Mainstream or Deprecated items or else it is non-standard\n",
      "product133: has Mainstream or Deprecated items or else it is non-standard\n",
      "product134: has Mainstream or Deprecated items or else it is non-standard\n",
      "product137: has Mainstream or Deprecated items or else it is non-standard\n",
      "product138: has Mainstream or Deprecated items or else it is non-standard\n",
      "product139: has Mainstream or Deprecated items or else it is non-standard\n",
      "product142: has Mainstream or Deprecated items or else it is non-standard\n",
      "product143: has Mainstream or Deprecated items or else it is non-standard\n",
      "product146: has Mainstream or Deprecated items or else it is non-standard\n",
      "product147: has Mainstream or Deprecated items or else it is non-standard\n",
      "product148: has Mainstream or Deprecated items or else it is non-standard\n",
      "product151: has Mainstream or Deprecated items or else it is non-standard\n",
      "product152: has Mainstream or Deprecated items or else it is non-standard\n",
      "product155: has Mainstream or Deprecated items or else it is non-standard\n",
      "product156: has Mainstream or Deprecated items or else it is non-standard\n",
      "product157: has Mainstream or Deprecated items or else it is non-standard\n",
      "product160: has Mainstream or Deprecated items or else it is non-standard\n",
      "product161: has Mainstream or Deprecated items or else it is non-standard\n",
      "product164: has Mainstream or Deprecated items or else it is non-standard\n",
      "product165: has Mainstream or Deprecated items or else it is non-standard\n",
      "product166: has Mainstream or Deprecated items or else it is non-standard\n",
      "product169: has Mainstream or Deprecated items or else it is non-standard\n",
      "product170: has Mainstream or Deprecated items or else it is non-standard\n",
      "product173: has Mainstream or Deprecated items or else it is non-standard\n",
      "product174: has Mainstream or Deprecated items or else it is non-standard\n",
      "product175: has Mainstream or Deprecated items or else it is non-standard\n",
      "product178: has Mainstream or Deprecated items or else it is non-standard\n",
      "product179: has Mainstream or Deprecated items or else it is non-standard\n",
      "product182: has Mainstream or Deprecated items or else it is non-standard\n",
      "product183: has Mainstream or Deprecated items or else it is non-standard\n",
      "product184: has Mainstream or Deprecated items or else it is non-standard\n",
      "product187: has Mainstream or Deprecated items or else it is non-standard\n",
      "product188: has Mainstream or Deprecated items or else it is non-standard\n",
      "product189: has Mainstream or Deprecated items or else it is non-standard\n",
      "product191: has Mainstream or Deprecated items or else it is non-standard\n",
      "product192: has Mainstream or Deprecated items or else it is non-standard\n",
      "product193: has Mainstream or Deprecated items or else it is non-standard\n",
      "product196: has Mainstream or Deprecated items or else it is non-standard\n",
      "product197: has Mainstream or Deprecated items or else it is non-standard\n",
      "product200: has Mainstream or Deprecated items or else it is non-standard\n",
      "product201: has Mainstream or Deprecated items or else it is non-standard\n",
      "product202: has Mainstream or Deprecated items or else it is non-standard\n",
      "product205: has Mainstream or Deprecated items or else it is non-standard\n",
      "product206: has Mainstream or Deprecated items or else it is non-standard\n",
      "product209: has Mainstream or Deprecated items or else it is non-standard\n",
      "product210: has Mainstream or Deprecated items or else it is non-standard\n",
      "product211: has Mainstream or Deprecated items or else it is non-standard\n",
      "product214: has Mainstream or Deprecated items or else it is non-standard\n",
      "product215: has Mainstream or Deprecated items or else it is non-standard\n",
      "product218: has Mainstream or Deprecated items or else it is non-standard\n",
      "product219: has Mainstream or Deprecated items or else it is non-standard\n",
      "product220: has Mainstream or Deprecated items or else it is non-standard\n",
      "product223: has Mainstream or Deprecated items or else it is non-standard\n",
      "product224: has Mainstream or Deprecated items or else it is non-standard\n",
      "product227: has Mainstream or Deprecated items or else it is non-standard\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "product228: has Mainstream or Deprecated items or else it is non-standard\n",
      "product229: has Mainstream or Deprecated items or else it is non-standard\n",
      "product232: has Mainstream or Deprecated items or else it is non-standard\n",
      "product233: has Mainstream or Deprecated items or else it is non-standard\n",
      "product234: has Mainstream or Deprecated items or else it is non-standard\n",
      "product236: has Mainstream or Deprecated items or else it is non-standard\n",
      "product237: has Mainstream or Deprecated items or else it is non-standard\n",
      "product238: has Mainstream or Deprecated items or else it is non-standard\n",
      "product241: has Mainstream or Deprecated items or else it is non-standard\n",
      "product242: has Mainstream or Deprecated items or else it is non-standard\n",
      "product245: has Mainstream or Deprecated items or else it is non-standard\n",
      "product246: has Mainstream or Deprecated items or else it is non-standard\n",
      "product247: has Mainstream or Deprecated items or else it is non-standard\n",
      "product250: has Mainstream or Deprecated items or else it is non-standard\n",
      "product251: has Mainstream or Deprecated items or else it is non-standard\n",
      "product252: has Mainstream or Deprecated items or else it is non-standard\n",
      "product254: has Mainstream or Deprecated items or else it is non-standard\n",
      "product255: has Mainstream or Deprecated items or else it is non-standard\n",
      "product256: has Mainstream or Deprecated items or else it is non-standard\n",
      "product259: has Mainstream or Deprecated items or else it is non-standard\n",
      "product260: has Mainstream or Deprecated items or else it is non-standard\n",
      "product263: has Mainstream or Deprecated items or else it is non-standard\n",
      "product264: has Mainstream or Deprecated items or else it is non-standard\n",
      "product265: has Mainstream or Deprecated items or else it is non-standard\n",
      "product268: has Mainstream or Deprecated items or else it is non-standard\n",
      "product269: has Mainstream or Deprecated items or else it is non-standard\n",
      "product272: has Mainstream or Deprecated items or else it is non-standard\n",
      "product273: has Mainstream or Deprecated items or else it is non-standard\n",
      "product274: has Mainstream or Deprecated items or else it is non-standard\n",
      "product277: has Mainstream or Deprecated items or else it is non-standard\n",
      "product278: has Mainstream or Deprecated items or else it is non-standard\n",
      "product281: has Mainstream or Deprecated items or else it is non-standard\n",
      "product282: has Mainstream or Deprecated items or else it is non-standard\n",
      "product283: has Mainstream or Deprecated items or else it is non-standard\n",
      "product286: has Mainstream or Deprecated items or else it is non-standard\n",
      "product287: has Mainstream or Deprecated items or else it is non-standard\n",
      "product290: has Mainstream or Deprecated items or else it is non-standard\n",
      "product291: has Mainstream or Deprecated items or else it is non-standard\n",
      "product292: has Mainstream or Deprecated items or else it is non-standard\n",
      "product295: has Mainstream or Deprecated items or else it is non-standard\n",
      "product296: has Mainstream or Deprecated items or else it is non-standard\n",
      "product299: has Mainstream or Deprecated items or else it is non-standard\n",
      "product300: has Mainstream or Deprecated items or else it is non-standard\n",
      "product301: has Mainstream or Deprecated items or else it is non-standard\n",
      "product304: has Mainstream or Deprecated items or else it is non-standard\n",
      "product305: has Mainstream or Deprecated items or else it is non-standard\n",
      "product308: has Mainstream or Deprecated items or else it is non-standard\n",
      "product309: has Mainstream or Deprecated items or else it is non-standard\n",
      "product310: has Mainstream or Deprecated items or else it is non-standard\n",
      "product313: has Mainstream or Deprecated items or else it is non-standard\n",
      "product314: has Mainstream or Deprecated items or else it is non-standard\n",
      "product317: has Mainstream or Deprecated items or else it is non-standard\n",
      "product318: has Mainstream or Deprecated items or else it is non-standard\n",
      "product319: has Mainstream or Deprecated items or else it is non-standard\n",
      "product322: has Mainstream or Deprecated items or else it is non-standard\n",
      "product323: has Mainstream or Deprecated items or else it is non-standard\n",
      "product326: has Mainstream or Deprecated items or else it is non-standard\n",
      "product327: has Mainstream or Deprecated items or else it is non-standard\n",
      "product328: has Mainstream or Deprecated items or else it is non-standard\n",
      "product331: has Mainstream or Deprecated items or else it is non-standard\n",
      "product332: has Mainstream or Deprecated items or else it is non-standard\n",
      "product333: has Mainstream or Deprecated items or else it is non-standard\n",
      "product335: has Mainstream or Deprecated items or else it is non-standard\n",
      "product336: has Mainstream or Deprecated items or else it is non-standard\n",
      "product337: has Mainstream or Deprecated items or else it is non-standard\n",
      "product340: has Mainstream or Deprecated items or else it is non-standard\n",
      "product341: has Mainstream or Deprecated items or else it is non-standard\n",
      "product344: has Mainstream or Deprecated items or else it is non-standard\n",
      "product345: has Mainstream or Deprecated items or else it is non-standard\n",
      "product346: has Mainstream or Deprecated items or else it is non-standard\n",
      "product349: has Mainstream or Deprecated items or else it is non-standard\n",
      "product350: has Mainstream or Deprecated items or else it is non-standard\n",
      "product353: has Mainstream or Deprecated items or else it is non-standard\n",
      "product354: has Mainstream or Deprecated items or else it is non-standard\n",
      "product355: has Mainstream or Deprecated items or else it is non-standard\n",
      "product358: has Mainstream or Deprecated items or else it is non-standard\n",
      "product359: has Mainstream or Deprecated items or else it is non-standard\n",
      "product360: has Mainstream or Deprecated items or else it is non-standard\n",
      "product362: has Mainstream or Deprecated items or else it is non-standard\n",
      "product363: has Mainstream or Deprecated items or else it is non-standard\n",
      "product364: has Mainstream or Deprecated items or else it is non-standard\n",
      "product367: has Mainstream or Deprecated items or else it is non-standard\n",
      "product368: has Mainstream or Deprecated items or else it is non-standard\n",
      "product371: has Mainstream or Deprecated items or else it is non-standard\n",
      "product372: has Mainstream or Deprecated items or else it is non-standard\n",
      "product373: has Mainstream or Deprecated items or else it is non-standard\n",
      "product376: has Mainstream or Deprecated items or else it is non-standard\n",
      "product377: has Mainstream or Deprecated items or else it is non-standard\n",
      "product380: has Mainstream or Deprecated items or else it is non-standard\n",
      "product381: has Mainstream or Deprecated items or else it is non-standard\n",
      "product382: has Mainstream or Deprecated items or else it is non-standard\n",
      "product385: has Mainstream or Deprecated items or else it is non-standard\n",
      "product386: has Mainstream or Deprecated items or else it is non-standard\n",
      "product389: has Mainstream or Deprecated items or else it is non-standard\n",
      "product390: has Mainstream or Deprecated items or else it is non-standard\n",
      "product391: has Mainstream or Deprecated items or else it is non-standard\n",
      "product394: has Mainstream or Deprecated items or else it is non-standard\n",
      "product395: has Mainstream or Deprecated items or else it is non-standard\n",
      "product396: has Mainstream or Deprecated items or else it is non-standard\n",
      "product398: has Mainstream or Deprecated items or else it is non-standard\n",
      "product399: has Mainstream or Deprecated items or else it is non-standard\n",
      "product400: has Mainstream or Deprecated items or else it is non-standard\n",
      "product403: has Mainstream or Deprecated items or else it is non-standard\n",
      "product404: has Mainstream or Deprecated items or else it is non-standard\n",
      "product407: has Mainstream or Deprecated items or else it is non-standard\n",
      "product408: has Mainstream or Deprecated items or else it is non-standard\n",
      "product409: has Mainstream or Deprecated items or else it is non-standard\n",
      "product412: has Mainstream or Deprecated items or else it is non-standard\n",
      "product413: has Mainstream or Deprecated items or else it is non-standard\n",
      "product416: has Mainstream or Deprecated items or else it is non-standard\n",
      "product417: has Mainstream or Deprecated items or else it is non-standard\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "product418: has Mainstream or Deprecated items or else it is non-standard\n",
      "product421: has Mainstream or Deprecated items or else it is non-standard\n",
      "product422: has Mainstream or Deprecated items or else it is non-standard\n",
      "product425: has Mainstream or Deprecated items or else it is non-standard\n",
      "product426: has Mainstream or Deprecated items or else it is non-standard\n",
      "product427: has Mainstream or Deprecated items or else it is non-standard\n",
      "product430: has Mainstream or Deprecated items or else it is non-standard\n",
      "product431: has Mainstream or Deprecated items or else it is non-standard\n",
      "product434: has Mainstream or Deprecated items or else it is non-standard\n",
      "product435: has Mainstream or Deprecated items or else it is non-standard\n",
      "product436: has Mainstream or Deprecated items or else it is non-standard\n",
      "product439: has Mainstream or Deprecated items or else it is non-standard\n",
      "product440: has Mainstream or Deprecated items or else it is non-standard\n",
      "product443: has Mainstream or Deprecated items or else it is non-standard\n",
      "product444: has Mainstream or Deprecated items or else it is non-standard\n",
      "product445: has Mainstream or Deprecated items or else it is non-standard\n",
      "product448: has Mainstream or Deprecated items or else it is non-standard\n",
      "product449: has Mainstream or Deprecated items or else it is non-standard\n",
      "product452: has Mainstream or Deprecated items or else it is non-standard\n",
      "product453: has Mainstream or Deprecated items or else it is non-standard\n",
      "product454: has Mainstream or Deprecated items or else it is non-standard\n",
      "product457: has Mainstream or Deprecated items or else it is non-standard\n",
      "product458: has Mainstream or Deprecated items or else it is non-standard\n",
      "product461: has Mainstream or Deprecated items or else it is non-standard\n",
      "product462: has Mainstream or Deprecated items or else it is non-standard\n",
      "product463: has Mainstream or Deprecated items or else it is non-standard\n",
      "product466: has Mainstream or Deprecated items or else it is non-standard\n",
      "product467: has Mainstream or Deprecated items or else it is non-standard\n",
      "product470: has Mainstream or Deprecated items or else it is non-standard\n",
      "product471: has Mainstream or Deprecated items or else it is non-standard\n",
      "product472: has Mainstream or Deprecated items or else it is non-standard\n",
      "product475: has Mainstream or Deprecated items or else it is non-standard\n",
      "product476: has Mainstream or Deprecated items or else it is non-standard\n",
      "product479: has Mainstream or Deprecated items or else it is non-standard\n",
      "product480: has Mainstream or Deprecated items or else it is non-standard\n",
      "product481: has Mainstream or Deprecated items or else it is non-standard\n",
      "product484: has Mainstream or Deprecated items or else it is non-standard\n",
      "product485: has Mainstream or Deprecated items or else it is non-standard\n",
      "product488: has Mainstream or Deprecated items or else it is non-standard\n",
      "product489: has Mainstream or Deprecated items or else it is non-standard\n",
      "product490: has Mainstream or Deprecated items or else it is non-standard\n",
      "product493: has Mainstream or Deprecated items or else it is non-standard\n",
      "product494: has Mainstream or Deprecated items or else it is non-standard\n",
      "product497: has Mainstream or Deprecated items or else it is non-standard\n",
      "product498: has Mainstream or Deprecated items or else it is non-standard\n",
      "product499: has Mainstream or Deprecated items or else it is non-standard\n",
      "Release status: Identified lower Obsoletes\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import sys\n",
    "import pandas as pd\n",
    "import datetime\n",
    "import logging\n",
    "\n",
    "\n",
    "parentdir = 'C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1'\n",
    "cadencedir = 'C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Cadence'\n",
    "dump = 'C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Dump'\n",
    "productrecords = 'C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products'\n",
    "date = datetime.datetime.today()\n",
    "month = date.month\n",
    "year = date.year\n",
    "day = date.day\n",
    "#Scopeidlist = []\n",
    "#Scopeidlist.append(idlist)\n",
    "monthlyfolder = str(day)+'.'+str(month)+'.'+str(year)\n",
    "\n",
    "\n",
    "logger = logging.getLogger('picuser')\n",
    "logger.setLevel(logging.WARNING)\n",
    "formatter = logging.Formatter('%(asctime)s:%(levelname)s:%(message)s')\n",
    "\n",
    "file_handler = logging.FileHandler('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Test.log')\n",
    "file_handler.setFormatter(formatter)\n",
    "\n",
    "logger.addHandler(file_handler)\n",
    "\n",
    "\n",
    "#Module 1 - Collect data for each product and store in respective directories\n",
    "#Module 2 - Seggregate data to create record, data to not process, drift data, scope sheet for sharepoint\n",
    "\n",
    "\n",
    "os.chdir(parentdir)\n",
    "os.chdir(cadencedir)\n",
    "\n",
    "\n",
    "def create_dir(productrecords, monthlyfolder):\n",
    "    os.chdir(productrecords)\n",
    "    try:\n",
    "        if not os.path.exists(monthlyfolder):\n",
    "            print('creating new folder '+monthlyfolder)\n",
    "            os.mkdir(monthlyfolder)\n",
    "        else:\n",
    "            print('folder name '+monthlyfolder+' already exists')\n",
    "    except OSError:\n",
    "        print('folder name '+monthlyfolder+' already exists')\n",
    "\n",
    "\n",
    "def Scoping(parentdir, cadencedir, productrecords, cdf, db, monthlyfolder):\n",
    "    print(\"Capturing today's Scope Data\")\n",
    "    for rows in cdf.itertuples():\n",
    "        idlist = rows.ProductID\n",
    "        tscid_recordfile = db.loc[db['ProductID'] == idlist]\n",
    "        if os.path.exists('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'allproducts'+str(day)+'_'+str(month)+'.csv'):\n",
    "            tscid_recordfile.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'allproducts'+str(day)+'_'+str(month)+'.csv', mode='a', index=False, header=False)\n",
    "        else:\n",
    "            tscid_recordfile.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'allproducts'+str(day)+'_'+str(month)+'.csv', index=False)\n",
    "        os.chdir(productrecords+'\\\\'+monthlyfolder)\n",
    "        productfolder = 'TSCID_' +str(idlist)\n",
    "        print('creating folder product: '+str(idlist))\n",
    "        try:\n",
    "            if not os.path.exists(productfolder):\n",
    "                os.mkdir(productfolder)\n",
    "                os.chdir(productfolder)\n",
    "                tscid_recordfile.to_csv('records.csv', index=False)\n",
    "            else:\n",
    "                print('Error:Product: '+str(idlist)+' folder already exists')\n",
    "        except OSError:\n",
    "            print('Error:Product: '+str(idlist)+' folder already exists')\n",
    "    os.chdir(parentdir)    \n",
    "    todayscope = pd.read_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'allproducts'+str(day)+'_'+str(month)+'.csv')\n",
    "    tscid_obsolete = todayscope.loc[(todayscope['LifeCycle'] == 'Obsolete') & (todayscope['Instances'] == 'Yes')]\n",
    "    tscid_norecord = todayscope.loc[(todayscope['IsLineageID'] == 'Yes') | (pd.isna(todayscope['Decision']))]\n",
    "    tscope = todayscope.dropna(subset=['Decision'])\n",
    "    tscid_actionitem = tscope.loc[(tscope['IsLineageID'] == 'No')]\n",
    "    if os.path.exists('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'NoRecord'+str(day)+'_'+str(month)+'.csv'):\n",
    "        tscid_norecord.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'NoRecord'+str(day)+'_'+str(month)+'.csv', mode='a', index=False, header=False)\n",
    "    else:\n",
    "        tscid_norecord.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'NoRecord'+str(day)+'_'+str(month)+'.csv', index=False)\n",
    "    \n",
    "    if os.path.exists('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'driftscopes'+str(day)+'_'+str(month)+'.csv'):\n",
    "        tscid_obsolete.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'driftscopes'+str(day)+'_'+str(month)+'.csv', mode='a', index=False, header=False)\n",
    "    else:\n",
    "        tscid_obsolete.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'driftscopes'+str(day)+'_'+str(month)+'.csv', index=False)\n",
    "    if os.path.exists('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'actionitem'+str(day)+'_'+str(month)+'.csv'):\n",
    "        tscid_actionitem.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'actionitem'+str(day)+'_'+str(month)+'.csv', mode='a', index=False, header=False)\n",
    "    else:\n",
    "        tscid_actionitem.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'actionitem'+str(day)+'_'+str(month)+'.csv', index=False)\n",
    "    print('Scope identification & Directory structure creation completed')\n",
    "    \n",
    "\n",
    "    \n",
    "\n",
    "def Releasecheck_part1(monthlyfolder):\n",
    "    Check_item = pd.read_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'actionitem'+str(day)+'_'+str(month)+'.csv')\n",
    "    actioncadence = Check_item['ProductID']\n",
    "    Check_item.loc[Check_item['Decision'] == 'Non-Standard', 'RecordStatus'] = 'NS One Record'\n",
    "    print('Decision status: Identified Non-Standard Decision items')\n",
    "    Check_item.loc[(Check_item['Decision'] != 'Non-Standard') & ((Check_item['LifeCycle'] == 'Mainstream') | (Check_item['LifeCycle'] == 'Deprecated')), 'RecordStatus'] = 'Check'\n",
    "    print('Release status: Identified Mainstream & Deprecated Releases')\n",
    "    Check_item.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'actionitem'+str(day)+'_'+str(month)+'.csv', index=False, header=True)\n",
    "    #actioncadence.drop_duplicates()\n",
    "    actioncadence.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'actioncadence'+str(day)+'_'+str(month)+'.csv', index=False, header=True)\n",
    "    cadenceclean = pd.read_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'actioncadence'+str(day)+'_'+str(month)+'.csv').drop_duplicates()\n",
    "    cadenceclean.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'actioncadence'+str(day)+'_'+str(month)+'.csv', index=False, header=True)\n",
    "\n",
    "    \n",
    "def Releasecheck_part2(monthlyfolder):\n",
    "    Targetactionitem = pd.read_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'actionitem'+str(day)+'_'+str(month)+'.csv')\n",
    "    Actioncadencelist = pd.read_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'actioncadence'+str(day)+'_'+str(month)+'.csv')\n",
    "    for rows in Actioncadencelist.itertuples():\n",
    "        newidlist = rows.ProductID\n",
    "        tscid_recordfile = Targetactionitem.loc[Targetactionitem['ProductID'] == newidlist]\n",
    "        nonstdother = len(tscid_recordfile[tscid_recordfile['Decision'] != 'Non-Standard'])\n",
    "        ismainstream = len(tscid_recordfile[tscid_recordfile['LifeCycle'] == 'Mainstream'])\n",
    "        isdeprctd = len(tscid_recordfile[tscid_recordfile['LifeCycle'] == 'Deprecated'])\n",
    "        if (nonstdother != 0) & (ismainstream == 0) & (isdeprctd == 0):\n",
    "            tscid_recordfile.loc[tscid_recordfile['ReleaseID'].idxmax(), 'RecordStatus'] = 'Top Obsolete Record'\n",
    "            if os.path.exists('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'Sharepoint'+str(day)+'_'+str(month)+'.csv'):\n",
    "                tscid_recordfile.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'Sharepoint'+str(day)+'_'+str(month)+'.csv', mode='a', index=False, header=False)\n",
    "                print('product'+str(newidlist)+': identified highest obsolete')\n",
    "            else:\n",
    "                tscid_recordfile.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'Sharepoint'+str(day)+'_'+str(month)+'.csv', mode='a', index=False)\n",
    "                print('product'+str(newidlist)+': identified highest obsolete')\n",
    "        else:       \n",
    "            if os.path.exists('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'Sharepoint'+str(day)+'_'+str(month)+'.csv'):\n",
    "                tscid_recordfile.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'Sharepoint'+str(day)+'_'+str(month)+'.csv', mode='a', index=False, header=False)\n",
    "                print('product'+str(newidlist)+': has Mainstream or Deprecated items or else it is non-standard')\n",
    "            else:\n",
    "                tscid_recordfile.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'Sharepoint'+str(day)+'_'+str(month)+'.csv', mode='a', index=False)\n",
    "                print('product'+str(newidlist)+': has Mainstream or Deprecated items or else it is non-standard')\n",
    "    Norecorditem = pd.read_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'Sharepoint'+str(day)+'_'+str(month)+'.csv')\n",
    "    Norecorditem.loc[pd.isna(Norecorditem['RecordStatus']), 'RecordStatus'] = 'Lower Obsolete' \n",
    "    print('Release status: Identified lower Obsoletes')\n",
    "    Norecorditem.to_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products\\\\'+monthlyfolder+'\\\\'+'Sharepoint'+str(day)+'_'+str(month)+'.csv', index=False, header=True)\n",
    "            \n",
    "            \n",
    "\n",
    "def main():\n",
    "    #parentdir = 'C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1'\n",
    "    #cadencedir = 'C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Cadence'\n",
    "    #dump = 'C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Dump'\n",
    "    #productrecords = 'C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Products'\n",
    "    #date = datetime.datetime.today()\n",
    "    #month = date.month\n",
    "    #year = date.year\n",
    "    #day = date.day\n",
    "    #monthlyfolder = str(day)+'.'+str(month)+'.'+str(year)\n",
    "    print('Loading Dataframe')\n",
    "    cdf = pd.read_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Cadence\\\\Cadencereport.csv')\n",
    "    db = pd.read_csv('C:\\\\Users\\\\91805\\\\Desktop\\\\Set Up\\\\Python\\\\Project1\\\\Cadence\\\\Dump.csv')\n",
    "    \n",
    "    create_dir(productrecords, monthlyfolder)\n",
    "    print('Analysing dump data & defining scope')\n",
    "    Scoping(parentdir, cadencedir, productrecords, cdf, db, monthlyfolder)\n",
    "    print('Release check of non-standard')\n",
    "    Releasecheck_part1(monthlyfolder)\n",
    "    print('Release check of Others')\n",
    "    Releasecheck_part2(monthlyfolder)\n",
    "    logging.shutdown()\n",
    "main()\n",
    "\n",
    "        \n",
    "\n",
    "    \n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "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.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
