{ "cells": [ { "cell_type": "code", "id": "initial_id", "metadata": { "ExecuteTime": { "end_time": "2024-07-30T12:35:06.718909Z", "start_time": "2024-07-30T12:35:06.081202Z" } }, "source": [ "import pandas as pd\n", "import numpy as np" ], "outputs": [], "execution_count": 1 }, { "cell_type": "code", "id": "13ad721e84c34936", "metadata": { "ExecuteTime": { "end_time": "2024-07-30T12:35:08.731721Z", "start_time": "2024-07-30T12:35:06.720903Z" } }, "source": [ "df=pd.read_csv(r'D:\\pynb\\Walmart\\KNN\\archive\\WMT_Grocery_202209.csv')\n", "df" ], "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\thaku\\AppData\\Local\\Temp\\ipykernel_13136\\1153799610.py:1: DtypeWarning: Columns (3) have mixed types. Specify dtype option on import or set low_memory=False.\n", " df=pd.read_csv(r'D:\\pynb\\Walmart\\KNN\\archive\\WMT_Grocery_202209.csv')\n" ] }, { "data": { "text/plain": [ " SHIPPING_LOCATION DEPARTMENT CATEGORY SUBCATEGORY \\\n", "0 79936 Deli Hummus, Dips, & Salsa NaN \n", "1 79936 Deli Hummus, Dips, & Salsa NaN \n", "2 79936 Deli Hummus, Dips, & Salsa NaN \n", "3 79936 Deli Hummus, Dips, & Salsa NaN \n", "4 79936 Deli Hummus, Dips, & Salsa NaN \n", "... ... ... ... ... \n", "568529 70072 Alcohol Wine White Wine \n", "568530 70072 Alcohol Wine White Wine \n", "568531 70072 Alcohol Wine White Wine \n", "568532 70072 Alcohol Wine White Wine \n", "568533 70072 Alcohol Wine White Wine \n", "\n", " BREADCRUMBS SKU \\\n", "0 Deli/Hummus, Dips, & Salsa 110895339 \n", "1 Deli/Hummus, Dips, & Salsa 105455228 \n", "2 Deli/Hummus, Dips, & Salsa 128642379 \n", "3 Deli/Hummus, Dips, & Salsa 366126367 \n", "4 Deli/Hummus, Dips, & Salsa 160090316 \n", "... ... ... \n", "568529 Alcohol/Wine 593600139 \n", "568530 Alcohol/Wine 333403243 \n", "568531 Alcohol/Wine 526588325 \n", "568532 Alcohol/Wine 286992782 \n", "568533 Alcohol/Wine 160015930 \n", "\n", " PRODUCT_URL \\\n", "0 https://www.walmart.com/ip/Marketside-Roasted-... \n", "1 https://www.walmart.com/ip/Marketside-Roasted-... \n", "2 https://www.walmart.com/ip/Marketside-Classic-... \n", "3 https://www.walmart.com/ip/Marketside-Everythi... \n", "4 https://www.walmart.com/ip/Price-s-Jalapeno-Di... \n", "... ... \n", "568529 https://www.walmart.com/ip/Farm-Fresh-Blueberr... \n", "568530 https://www.walmart.com/ip/Farm-Fresh-Peach-Mo... \n", "568531 https://www.walmart.com/ip/Farm-Fresh-Raspberr... \n", "568532 https://www.walmart.com/ip/Farm-Fresh-Mango-Mo... \n", "568533 https://www.walmart.com/ip/Ole-Orleans-Heritag... \n", "\n", " PRODUCT_NAME BRAND \\\n", "0 Marketside Roasted Red Pepper Hummus, 10 Oz Marketside \n", "1 Marketside Roasted Garlic Hummus, 10 Oz Marketside \n", "2 Marketside Classic Hummus, 10 Oz Marketside \n", "3 Marketside Everything Hummus, 10 oz Marketside \n", "4 Price's Jalapeno Dip, 12 Oz. Price's \n", "... ... ... \n", "568529 Farm Fresh Blueberry Moscato 750ml Farm Fresh Wine Company \n", "568530 Farm Fresh Peach Moscato 750 Ml Farm Fresh Wine Company \n", "568531 Farm Fresh Raspberry Moscato 750ml Farm Fresh Wine Company \n", "568532 Farm Fresh Mango Moscato 750ml Farm Fresh Wine Company \n", "568533 Ole Orleans Heritage Riesling 750ml Ole Orleans \n", "\n", " PRICE_RETAIL PRICE_CURRENT PRODUCT_SIZE PROMOTION \\\n", "0 2.67 2.67 10 NaN \n", "1 2.67 2.67 10 NaN \n", "2 2.67 2.67 10 NaN \n", "3 2.67 2.67 10 NaN \n", "4 3.12 3.12 12 NaN \n", "... ... ... ... ... \n", "568529 9.98 9.98 750 NaN \n", "568530 9.98 9.98 750 NaN \n", "568531 9.98 9.98 750 NaN \n", "568532 9.98 9.98 750 NaN \n", "568533 18.98 18.98 750 NaN \n", "\n", " RunDate tid \n", "0 2022-09-11 21:20:04 16163804 \n", "1 2022-09-11 21:20:04 16163805 \n", "2 2022-09-11 21:20:04 16163806 \n", "3 2022-09-11 21:20:04 16163807 \n", "4 2022-09-11 21:20:04 16163808 \n", "... ... ... \n", "568529 2022-09-11 21:20:04 16732333 \n", "568530 2022-09-11 21:20:04 16732334 \n", "568531 2022-09-11 21:20:04 16732335 \n", "568532 2022-09-11 21:20:04 16732336 \n", "568533 2022-09-11 21:20:04 16732337 \n", "\n", "[568534 rows x 15 columns]" ], "text/html": [ "
\n", " | SHIPPING_LOCATION | \n", "DEPARTMENT | \n", "CATEGORY | \n", "SUBCATEGORY | \n", "BREADCRUMBS | \n", "SKU | \n", "PRODUCT_URL | \n", "PRODUCT_NAME | \n", "BRAND | \n", "PRICE_RETAIL | \n", "PRICE_CURRENT | \n", "PRODUCT_SIZE | \n", "PROMOTION | \n", "RunDate | \n", "tid | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "79936 | \n", "Deli | \n", "Hummus, Dips, & Salsa | \n", "NaN | \n", "Deli/Hummus, Dips, & Salsa | \n", "110895339 | \n", "https://www.walmart.com/ip/Marketside-Roasted-... | \n", "Marketside Roasted Red Pepper Hummus, 10 Oz | \n", "Marketside | \n", "2.67 | \n", "2.67 | \n", "10 | \n", "NaN | \n", "2022-09-11 21:20:04 | \n", "16163804 | \n", "
1 | \n", "79936 | \n", "Deli | \n", "Hummus, Dips, & Salsa | \n", "NaN | \n", "Deli/Hummus, Dips, & Salsa | \n", "105455228 | \n", "https://www.walmart.com/ip/Marketside-Roasted-... | \n", "Marketside Roasted Garlic Hummus, 10 Oz | \n", "Marketside | \n", "2.67 | \n", "2.67 | \n", "10 | \n", "NaN | \n", "2022-09-11 21:20:04 | \n", "16163805 | \n", "
2 | \n", "79936 | \n", "Deli | \n", "Hummus, Dips, & Salsa | \n", "NaN | \n", "Deli/Hummus, Dips, & Salsa | \n", "128642379 | \n", "https://www.walmart.com/ip/Marketside-Classic-... | \n", "Marketside Classic Hummus, 10 Oz | \n", "Marketside | \n", "2.67 | \n", "2.67 | \n", "10 | \n", "NaN | \n", "2022-09-11 21:20:04 | \n", "16163806 | \n", "
3 | \n", "79936 | \n", "Deli | \n", "Hummus, Dips, & Salsa | \n", "NaN | \n", "Deli/Hummus, Dips, & Salsa | \n", "366126367 | \n", "https://www.walmart.com/ip/Marketside-Everythi... | \n", "Marketside Everything Hummus, 10 oz | \n", "Marketside | \n", "2.67 | \n", "2.67 | \n", "10 | \n", "NaN | \n", "2022-09-11 21:20:04 | \n", "16163807 | \n", "
4 | \n", "79936 | \n", "Deli | \n", "Hummus, Dips, & Salsa | \n", "NaN | \n", "Deli/Hummus, Dips, & Salsa | \n", "160090316 | \n", "https://www.walmart.com/ip/Price-s-Jalapeno-Di... | \n", "Price's Jalapeno Dip, 12 Oz. | \n", "Price's | \n", "3.12 | \n", "3.12 | \n", "12 | \n", "NaN | \n", "2022-09-11 21:20:04 | \n", "16163808 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
568529 | \n", "70072 | \n", "Alcohol | \n", "Wine | \n", "White Wine | \n", "Alcohol/Wine | \n", "593600139 | \n", "https://www.walmart.com/ip/Farm-Fresh-Blueberr... | \n", "Farm Fresh Blueberry Moscato 750ml | \n", "Farm Fresh Wine Company | \n", "9.98 | \n", "9.98 | \n", "750 | \n", "NaN | \n", "2022-09-11 21:20:04 | \n", "16732333 | \n", "
568530 | \n", "70072 | \n", "Alcohol | \n", "Wine | \n", "White Wine | \n", "Alcohol/Wine | \n", "333403243 | \n", "https://www.walmart.com/ip/Farm-Fresh-Peach-Mo... | \n", "Farm Fresh Peach Moscato 750 Ml | \n", "Farm Fresh Wine Company | \n", "9.98 | \n", "9.98 | \n", "750 | \n", "NaN | \n", "2022-09-11 21:20:04 | \n", "16732334 | \n", "
568531 | \n", "70072 | \n", "Alcohol | \n", "Wine | \n", "White Wine | \n", "Alcohol/Wine | \n", "526588325 | \n", "https://www.walmart.com/ip/Farm-Fresh-Raspberr... | \n", "Farm Fresh Raspberry Moscato 750ml | \n", "Farm Fresh Wine Company | \n", "9.98 | \n", "9.98 | \n", "750 | \n", "NaN | \n", "2022-09-11 21:20:04 | \n", "16732335 | \n", "
568532 | \n", "70072 | \n", "Alcohol | \n", "Wine | \n", "White Wine | \n", "Alcohol/Wine | \n", "286992782 | \n", "https://www.walmart.com/ip/Farm-Fresh-Mango-Mo... | \n", "Farm Fresh Mango Moscato 750ml | \n", "Farm Fresh Wine Company | \n", "9.98 | \n", "9.98 | \n", "750 | \n", "NaN | \n", "2022-09-11 21:20:04 | \n", "16732336 | \n", "
568533 | \n", "70072 | \n", "Alcohol | \n", "Wine | \n", "White Wine | \n", "Alcohol/Wine | \n", "160015930 | \n", "https://www.walmart.com/ip/Ole-Orleans-Heritag... | \n", "Ole Orleans Heritage Riesling 750ml | \n", "Ole Orleans | \n", "18.98 | \n", "18.98 | \n", "750 | \n", "NaN | \n", "2022-09-11 21:20:04 | \n", "16732337 | \n", "
568534 rows × 15 columns
\n", "\n", " | PRODUCT_NAME | \n", "DEPARTMENT | \n", "CATEGORY | \n", "BREADCRUMBS | \n", "BRAND | \n", "PRODUCT | \n", "
---|---|---|---|---|---|---|
0 | \n", "Marketside Roasted Red Pepper Hummus, 10 Oz | \n", "Deli | \n", "Hummus, Dips, & Salsa | \n", "Deli/Hummus, Dips, & Salsa | \n", "Marketside | \n", "Marketside Roasted Red Pepper Hummus, 10 Oz | \n", "
1 | \n", "Marketside Roasted Garlic Hummus, 10 Oz | \n", "Deli | \n", "Hummus, Dips, & Salsa | \n", "Deli/Hummus, Dips, & Salsa | \n", "Marketside | \n", "Marketside Roasted Garlic Hummus, 10 Oz | \n", "
2 | \n", "Marketside Classic Hummus, 10 Oz | \n", "Deli | \n", "Hummus, Dips, & Salsa | \n", "Deli/Hummus, Dips, & Salsa | \n", "Marketside | \n", "Marketside Classic Hummus, 10 Oz | \n", "
3 | \n", "Marketside Everything Hummus, 10 oz | \n", "Deli | \n", "Hummus, Dips, & Salsa | \n", "Deli/Hummus, Dips, & Salsa | \n", "Marketside | \n", "Marketside Everything Hummus, 10 oz | \n", "
4 | \n", "Price's Jalapeno Dip, 12 Oz. | \n", "Deli | \n", "Hummus, Dips, & Salsa | \n", "Deli/Hummus, Dips, & Salsa | \n", "Price's | \n", "Price's Jalapeno Dip, 12 Oz. | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
568529 | \n", "Farm Fresh Blueberry Moscato 750ml | \n", "Alcohol | \n", "Wine | \n", "Alcohol/Wine | \n", "Farm Fresh Wine Company | \n", "Farm Fresh Blueberry Moscato 750ml | \n", "
568530 | \n", "Farm Fresh Peach Moscato 750 Ml | \n", "Alcohol | \n", "Wine | \n", "Alcohol/Wine | \n", "Farm Fresh Wine Company | \n", "Farm Fresh Peach Moscato 750 Ml | \n", "
568531 | \n", "Farm Fresh Raspberry Moscato 750ml | \n", "Alcohol | \n", "Wine | \n", "Alcohol/Wine | \n", "Farm Fresh Wine Company | \n", "Farm Fresh Raspberry Moscato 750ml | \n", "
568532 | \n", "Farm Fresh Mango Moscato 750ml | \n", "Alcohol | \n", "Wine | \n", "Alcohol/Wine | \n", "Farm Fresh Wine Company | \n", "Farm Fresh Mango Moscato 750ml | \n", "
568533 | \n", "Ole Orleans Heritage Riesling 750ml | \n", "Alcohol | \n", "Wine | \n", "Alcohol/Wine | \n", "Ole Orleans | \n", "Ole Orleans Heritage Riesling 750ml | \n", "
568507 rows × 6 columns
\n", "\n", " | PRODUCT_NAME | \n", "DEPARTMENT | \n", "CATEGORY | \n", "BREADCRUMBS | \n", "BRAND | \n", "PRODUCT | \n", "tags | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "Marketside Roasted Red Pepper Hummus, 10 Oz | \n", "[deli] | \n", "[hummus, dips, salsa] | \n", "[delihummus, dips, salsa] | \n", "[marketside] | \n", "[marketside, roasted, red, pepper, hummus, oz] | \n", "[marketside, roasted, red, pepper, hummus, oz,... | \n", "
1 | \n", "Marketside Roasted Garlic Hummus, 10 Oz | \n", "[deli] | \n", "[hummus, dips, salsa] | \n", "[delihummus, dips, salsa] | \n", "[marketside] | \n", "[marketside, roasted, garlic, hummus, oz] | \n", "[marketside, roasted, garlic, hummus, oz, deli... | \n", "
2 | \n", "Marketside Classic Hummus, 10 Oz | \n", "[deli] | \n", "[hummus, dips, salsa] | \n", "[delihummus, dips, salsa] | \n", "[marketside] | \n", "[marketside, classic, hummus, oz] | \n", "[marketside, classic, hummus, oz, deli, hummus... | \n", "
3 | \n", "Marketside Everything Hummus, 10 oz | \n", "[deli] | \n", "[hummus, dips, salsa] | \n", "[delihummus, dips, salsa] | \n", "[marketside] | \n", "[marketside, everything, hummus, oz] | \n", "[marketside, everything, hummus, oz, deli, hum... | \n", "
4 | \n", "Price's Jalapeno Dip, 12 Oz. | \n", "[deli] | \n", "[hummus, dips, salsa] | \n", "[delihummus, dips, salsa] | \n", "[prices] | \n", "[prices, jalapeno, dip, oz] | \n", "[prices, jalapeno, dip, oz, deli, hummus, dips... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
568529 | \n", "Farm Fresh Blueberry Moscato 750ml | \n", "[alcohol] | \n", "[wine] | \n", "[alcoholwine] | \n", "[farm, fresh, wine, company] | \n", "[farm, fresh, blueberry, moscato, ml] | \n", "[farm, fresh, blueberry, moscato, ml, alcohol,... | \n", "
568530 | \n", "Farm Fresh Peach Moscato 750 Ml | \n", "[alcohol] | \n", "[wine] | \n", "[alcoholwine] | \n", "[farm, fresh, wine, company] | \n", "[farm, fresh, peach, moscato, ml] | \n", "[farm, fresh, peach, moscato, ml, alcohol, win... | \n", "
568531 | \n", "Farm Fresh Raspberry Moscato 750ml | \n", "[alcohol] | \n", "[wine] | \n", "[alcoholwine] | \n", "[farm, fresh, wine, company] | \n", "[farm, fresh, raspberry, moscato, ml] | \n", "[farm, fresh, raspberry, moscato, ml, alcohol,... | \n", "
568532 | \n", "Farm Fresh Mango Moscato 750ml | \n", "[alcohol] | \n", "[wine] | \n", "[alcoholwine] | \n", "[farm, fresh, wine, company] | \n", "[farm, fresh, mango, moscato, ml] | \n", "[farm, fresh, mango, moscato, ml, alcohol, win... | \n", "
568533 | \n", "Ole Orleans Heritage Riesling 750ml | \n", "[alcohol] | \n", "[wine] | \n", "[alcoholwine] | \n", "[ole, orleans] | \n", "[ole, orleans, heritage, riesling, ml] | \n", "[ole, orleans, heritage, riesling, ml, alcohol... | \n", "
568507 rows × 7 columns
\n", "\n", " | PRODUCT_NAME | \n", "tags | \n", "
---|---|---|
0 | \n", "Marketside Roasted Red Pepper Hummus, 10 Oz | \n", "[marketside, roasted, red, pepper, hummus, oz,... | \n", "
1 | \n", "Marketside Roasted Garlic Hummus, 10 Oz | \n", "[marketside, roasted, garlic, hummus, oz, deli... | \n", "
2 | \n", "Marketside Classic Hummus, 10 Oz | \n", "[marketside, classic, hummus, oz, deli, hummus... | \n", "
3 | \n", "Marketside Everything Hummus, 10 oz | \n", "[marketside, everything, hummus, oz, deli, hum... | \n", "
4 | \n", "Price's Jalapeno Dip, 12 Oz. | \n", "[prices, jalapeno, dip, oz, deli, hummus, dips... | \n", "
... | \n", "... | \n", "... | \n", "
568529 | \n", "Farm Fresh Blueberry Moscato 750ml | \n", "[farm, fresh, blueberry, moscato, ml, alcohol,... | \n", "
568530 | \n", "Farm Fresh Peach Moscato 750 Ml | \n", "[farm, fresh, peach, moscato, ml, alcohol, win... | \n", "
568531 | \n", "Farm Fresh Raspberry Moscato 750ml | \n", "[farm, fresh, raspberry, moscato, ml, alcohol,... | \n", "
568532 | \n", "Farm Fresh Mango Moscato 750ml | \n", "[farm, fresh, mango, moscato, ml, alcohol, win... | \n", "
568533 | \n", "Ole Orleans Heritage Riesling 750ml | \n", "[ole, orleans, heritage, riesling, ml, alcohol... | \n", "
568507 rows × 2 columns
\n", "