Domain: Inventory & Supply Chain

From the provided CSV file (retail_data.csv), compute the KPI SWSI (Size-Weighted Sales Intensity) for wines and liquors, and return the top 20 items ranked by this KPI in liters per month.

Assume that one can equals 355 ml.

Use the following definitions:

- UNITS_SOLD = RETAIL SALES + WAREHOUSE SALES
- A SKU is active in a month if UNITS_SOLD > 0 for that month
- ACTIVE_MONTHS = number of months where UNITS_SOLD > 0
- TOTAL_VOLUME_L = sum over each ITEM CODE of (UNITS_SOLD × SIZE_L), where SIZE_L is the package size expressed in liters
- SWSI_L_PER_ACTIVE_MONTH = TOTAL_VOLUME_L ÷ ACTIVE_MONTHS

Output requirements for the KPI calculation:

- Rank items by SWSI_L_PER_ACTIVE_MONTH in descending order
- Break ties using TOTAL_VOLUME_L in descending order
- Return the top 20 items, each including:
 - ITEM_CODE
 - a representative ITEM_DESCRIPTION
 - SUPPLIER
 - ITEM_TYPE
 - ACTIVE_MONTHS
 - TOTAL_UNITS_SOLD
 - TOTAL_VOLUME_L
 - SWSI_L_PER_ACTIVE_MONTH
- Round KPI values to 2 decimal places
- Structure the result as a JSON object containing an array of the top items

After producing the KPI output, answer the following questions based on the ranking:

1. Which item is ranked first by SWSI_L_PER_ACTIVE_MONTH?
2. Which item is ranked third by SWSI_L_PER_ACTIVE_MONTH?
3. Which item is ranked fifth by SWSI_L_PER_ACTIVE_MONTH?
4. Which item is ranked tenth by SWSI_L_PER_ACTIVE_MONTH?

Return the JSON KPI object followed by the answers to these questions.

Grading rubric:
criterion: The length of the top items array is equal to 20.
weight: 5
criterion: Every element of the array containing the top items (according to the KPI) contains keys describing these features (not necessarily with these names as keys) ITEM_CODE, ITEM_DESCRIPTION, ITEM_TYPE, SUPPLIER, ACTIVE_MONTHS, TOTAL_UNITS_SOLD, TOTAL_VOLUME_L, SWSI_L_PER_ACTIVE_MONTH.
weight: 5
criterion: The item code of the top item according to the SWSI_L_PER_ACTIVE_MONTH KPI is 872737.
weight: 20
criterion: For item_code '89010', TOTAL_VOLUME_L equals 17440.00 within ±1e-2.
weight: 20
criterion: For item_code '796559', ACTIVE_MONTHS equals 10.
weight: 5
criterion: All the items listed in the SWSI KPI output list are either wine or liquor.
weight: 5
criterion: For item_code '872737', the total units sold equals 153916.
weight: 10
criterion: The item code of the third best item according to the SWSI_L_PER_ACTIVE_MONTH KPI is 796559.
weight: 20
criterion: The item code of the fifth best item according to the SWSI_L_PER_ACTIVE_MONTH KPI is 494990.
weight: 20
criterion: The item code of the twentieth best item according to the SWSI_L_PER_ACTIVE_MONTH KPI is 40932.
weight: 20

Golden answer:
```python
import pandas as pd
import numpy as np

df = pd.read_csv("retail_data.csv")

# 1) Normalize empties (blank strings, whitespace, and literal EMPTY) to NaN
df = df.replace(r"^\s*$", np.nan, regex=True)
df = df.replace({"EMPTY": np.nan, "empty": np.nan})

# 2) Left-compact every row (slide non-empty values left)
def left_compact_row(row: pd.Series) -> pd.Series:
    vals = row.dropna().to_list()                      # keep order, drop empties
    vals += [np.nan] * (len(row) - len(vals))          # pad to original width
    return pd.Series(vals, index=row.index)

df_fixed = df.apply(left_compact_row, axis=1)

# drop any Unnamed columns created by stray separators
df_fixed = df_fixed.loc[:, ~df_fixed.columns.astype(str).str.match(r"^Unnamed")]

# ============================================================
# 1) FILTER: keep only WINE + LIQUOR
# ============================================================
wine_liquor_df = df_fixed[df_fixed["ITEM TYPE"].str.strip().str.upper().isin(["WINE", "LIQUOR"])].copy()

# Optional: keep sales columns numeric (helps avoid weird dtype issues)
for c in ["RETAIL SALES", "RETAIL TRANSFERS", "WAREHOUSE SALES"]:
    wine_liquor_df[c] = pd.to_numeric(wine_liquor_df[c], errors="coerce")

# ============================================================
# 2) CREATE SIZE COLUMN (milliliters)
#    We fill SIZE_ML incrementally, ONLY where it is still NaN.
# ============================================================
wine_liquor_df["SIZE_ML"] = np.nan

# ------------------------------------------------------------
# Step A: Parse "- XXXML" pattern (e.g., "BOOTLEG RED - 750ML")
# ------------------------------------------------------------
ml_dash = (
    wine_liquor_df.loc[wine_liquor_df["SIZE_ML"].isna(), "ITEM DESCRIPTION"]
    .str.upper()
    .str.extract(r"-\s*([0-9]+(?:\.[0-9]+)?)\s*ML\b")[0]
)
wine_liquor_df.loc[wine_liquor_df["SIZE_ML"].isna(), "SIZE_ML"] = pd.to_numeric(ml_dash, errors="coerce")

# ------------------------------------------------------------
# Step B: Parse liters (e.g., "1.75L", "1L", "1.5L")
#         Convert L -> mL by multiplying by 1000.
# ------------------------------------------------------------
liters = (
    wine_liquor_df.loc[wine_liquor_df["SIZE_ML"].isna(), "ITEM DESCRIPTION"]
    .str.upper()
    .str.extract(r"\b([0-9]+(?:\.[0-9]+)?)\s*L\b")[0]
)
wine_liquor_df.loc[wine_liquor_df["SIZE_ML"].isna(), "SIZE_ML"] = (
    pd.to_numeric(liters, errors="coerce") * 1000
)

# ------------------------------------------------------------
# Step C: Parse "XXXML" anywhere (not necessarily with "- ")
#         Examples:
#           "SAUZA HORNITOS REPOSADO 750ML"
#           "DIPLOMATICO ... VAP750ML" (no space before ML)
# ------------------------------------------------------------
ml_anywhere = (
    wine_liquor_df.loc[wine_liquor_df["SIZE_ML"].isna(), "ITEM DESCRIPTION"]
    .str.upper()
    .str.extract(r"\b([0-9]+(?:\.[0-9]+)?)\s*ML\b")[0]
)
wine_liquor_df.loc[wine_liquor_df["SIZE_ML"].isna(), "SIZE_ML"] = pd.to_numeric(ml_anywhere, errors="coerce")

# ------------------------------------------------------------
# Step D: Parse pack cans format "X/Y CAN" (e.g., "6/4 CAN")
#         Assumption: STANDARD CAN SIZE = 355 mL (12oz can).
#         We store TOTAL package volume in SIZE_ML:
#           total_cans = X * Y
#           SIZE_ML = total_cans * CAN_ML
#         Also stores helper columns PACK_UNITS and UNIT_ML.
# ------------------------------------------------------------
CAN_ML = 355

mask_can = (
    wine_liquor_df["SIZE_ML"].isna()
    & wine_liquor_df["ITEM DESCRIPTION"].str.contains(r"\b\d+\s*/\s*\d+\s*CAN\b", case=False, na=False)
)

packs = (
    wine_liquor_df.loc[mask_can, "ITEM DESCRIPTION"]
    .str.upper()
    .str.extract(r"\b(\d+)\s*/\s*(\d+)\s*CAN\b")
)

total_cans = pd.to_numeric(packs[0], errors="coerce") * pd.to_numeric(packs[1], errors="coerce")

wine_liquor_df.loc[mask_can, "PACK_UNITS"] = total_cans
wine_liquor_df.loc[mask_can, "UNIT_ML"] = CAN_ML
wine_liquor_df.loc[mask_can, "SIZE_ML"] = total_cans * CAN_ML

# ------------------------------------------------------------
# Step E: Parse trailing "unitless" bottle size in mL
#         Examples: "BLOOD MOON 750"
#         Safety: only accept a whitelist of common bottle sizes.
# ------------------------------------------------------------
ALLOWED_ML = {
    50, 100, 200, 250, 330, 355, 375, 500, 650, 700, 720,
    750, 1000, 1500, 1750, 1800, 3000
}

mask_unitless = (
    wine_liquor_df["SIZE_ML"].isna()
    & wine_liquor_df["ITEM DESCRIPTION"].astype(str).str.upper()
        .str.extract(r"\b(\d{2,4})\b\s*$")[0]
        .notna()
)

trailing_num = (
    wine_liquor_df.loc[wine_liquor_df["SIZE_ML"].isna(), "ITEM DESCRIPTION"]
    .astype(str).str.upper()
    .str.extract(r"\b(\d{2,4})\b\s*$")[0]
)

trailing_ml = pd.to_numeric(trailing_num, errors="coerce")
trailing_ml = trailing_ml.where(trailing_ml.isin(ALLOWED_ML))

wine_liquor_df.loc[trailing_ml.index, "SIZE_ML"] = wine_liquor_df.loc[trailing_ml.index, "SIZE_ML"].fillna(trailing_ml)

# ============================================================
# 3) QUICK COVERAGE CHECK
# ============================================================
total_rows = len(wine_liquor_df)
parsed_rows = wine_liquor_df["SIZE_ML"].notna().sum()
unparsed_rows = wine_liquor_df["SIZE_ML"].isna().sum()

print(f"Total rows (WINE+LIQUOR): {total_rows}")
print(f"Parsed SIZE_ML: {parsed_rows}")
print(f"Unparsed SIZE_ML: {unparsed_rows}")
print(f"Percent parsed: {parsed_rows / total_rows * 100:.1f}%")


import numpy as np
import pandas as pd
import json

# ============================================================
# SWSI (Size-Weighted Sales Intensity) for wine_liquor_df
# Returns JSON (Python dict / JSON string) instead of a table.
#
# SWSI_ITEM = TotalVolumeML / ActiveMonths
#   UnitsSold   = RETAIL SALES + WAREHOUSE SALES
#   VolumeML    = UnitsSold * SIZE_ML
#   ActiveMonths= # distinct (YEAR, MONTH) where UnitsSold > 0
# ============================================================

def ensure_size_ml(df, can_ml=355):
    """Ensure df has SIZE_ML. If missing, rebuild using the parsing rules so far."""

    df = df.copy()
    df["SIZE_ML"] = np.nan

    wl_mask = df["ITEM TYPE"].astype(str).str.strip().str.upper().isin(["WINE", "LIQUOR"])

    # 1) "- ###ML"
    mask = wl_mask & df["SIZE_ML"].isna()
    ml_dash = (
        df.loc[mask, "ITEM DESCRIPTION"].astype(str).str.upper()
        .str.extract(r"-\s*([0-9]+(?:\.[0-9]+)?)\s*ML\b")[0]
    )
    df.loc[mask, "SIZE_ML"] = pd.to_numeric(ml_dash, errors="coerce")

    # 2) "###L" -> ml
    mask = wl_mask & df["SIZE_ML"].isna()
    liters = (
        df.loc[mask, "ITEM DESCRIPTION"].astype(str).str.upper()
        .str.extract(r"\b([0-9]+(?:\.[0-9]+)?)\s*L\b")[0]
    )
    df.loc[mask, "SIZE_ML"] = pd.to_numeric(liters, errors="coerce") * 1000

    # 3) "###ML" anywhere (incl. VAP750ML)
    mask = wl_mask & df["SIZE_ML"].isna()
    ml_any = (
        df.loc[mask, "ITEM DESCRIPTION"].astype(str).str.upper()
        .str.extract(r"\b([0-9]+(?:\.[0-9]+)?)\s*ML\b")[0]
    )
    df.loc[mask, "SIZE_ML"] = pd.to_numeric(ml_any, errors="coerce")

    # 4) "X/Y CAN" -> total package ml
    mask = (
        wl_mask
        & df["SIZE_ML"].isna()
        & df["ITEM DESCRIPTION"].astype(str).str.contains(r"\b\d+\s*/\s*\d+\s*CAN\b", case=False, na=False)
    )
    packs = (
        df.loc[mask, "ITEM DESCRIPTION"].astype(str).str.upper()
        .str.extract(r"\b(\d+)\s*/\s*(\d+)\s*CAN\b")
    )
    total_cans = pd.to_numeric(packs[0], errors="coerce") * pd.to_numeric(packs[1], errors="coerce")
    df.loc[mask, "SIZE_ML"] = total_cans * can_ml

    # 5) Trailing unitless size like "BLOOD MOON 750" -> ml (whitelist)
    ALLOWED_ML = {
        50, 100, 200, 250, 330, 355, 375, 500, 650, 700, 720,
        750, 1000, 1500, 1750, 1800, 3000
    }

    mask = wl_mask & df["SIZE_ML"].isna()
    trailing = (
        df.loc[mask, "ITEM DESCRIPTION"].astype(str).str.upper()
        .str.extract(r"\b(\d{2,4})\b\s*$")[0]
    )
    trailing_ml = pd.to_numeric(trailing, errors="coerce").where(lambda s: s.isin(ALLOWED_ML))
    df.loc[mask, "SIZE_ML"] = trailing_ml

    return df


def compute_swsi_json(wine_liquor_df, top_n=20, can_ml=355, as_json_string=False):
    """
    Compute SWSI and return top items with descriptive fields included.
    Representative description/supplier/type are taken as the most common
    (mode) within each ITEM CODE, with sensible fallbacks.
    """
    df = ensure_size_ml(wine_liquor_df, can_ml=can_ml)

    # Keep only rows where SIZE_ML is available
    df = df[df["SIZE_ML"].notna()].copy()

    # Units sold and time key
    df["UNITS_SOLD"] = df["RETAIL SALES"].fillna(0) + df["WAREHOUSE SALES"].fillna(0)
    df["YM"] = (
        df["YEAR"].astype(int).astype(str)
        + "-"
        + df["MONTH"].astype(int).astype(str).str.zfill(2)
    )
    df["VOLUME_ML"] = df["UNITS_SOLD"] * df["SIZE_ML"]

    # Only months where item actually sold
    active = df[df["UNITS_SOLD"] > 0].copy()

    # --- helper to get a "representative" value per group ---
    def representative(series: pd.Series):
        s = series.dropna().astype(str).str.strip()
        if s.empty:
            return None
        modes = s.mode()
        if not modes.empty:
            return modes.iloc[0]
        return s.iloc[0]

    # KPI calc
    item_kpi = (
        active.groupby(["ITEM CODE"], dropna=False)
        .agg(
            ACTIVE_MONTHS=("YM", "nunique"),
            TOTAL_UNITS_SOLD=("UNITS_SOLD", "sum"),
            TOTAL_VOLUME_ML=("VOLUME_ML", "sum"),
        )
        .reset_index()
    )

    item_kpi["SWSI_ML_PER_ACTIVE_MONTH"] = (
        item_kpi["TOTAL_VOLUME_ML"] / item_kpi["ACTIVE_MONTHS"].replace(0, np.nan)
    )
    item_kpi["SWSI_L_PER_ACTIVE_MONTH"] = item_kpi["SWSI_ML_PER_ACTIVE_MONTH"] / 1000.0
    item_kpi["TOTAL_VOLUME_L"] = item_kpi["TOTAL_VOLUME_ML"] / 1000.0

    # --- descriptive fields per ITEM CODE (representative) ---
    # NOTE: adjust column names here if yours differ (e.g., "SUPPLIER" vs "SUPPLIER NAME")
    meta = (
        df.groupby("ITEM CODE", dropna=False)
        .agg(
            ITEM_DESCRIPTION=("ITEM DESCRIPTION", representative),
            SUPPLIER=("SUPPLIER", representative),
            ITEM_TYPE=("ITEM TYPE", representative),
        )
        .reset_index()
    )

    # Merge + rank
    out = item_kpi.merge(meta, on="ITEM CODE", how="left")

    out = out.sort_values(
        ["SWSI_L_PER_ACTIVE_MONTH", "TOTAL_VOLUME_L"],
        ascending=[False, False]
    ).head(top_n)

    # Round for presentation
    out["TOTAL_VOLUME_L"] = out["TOTAL_VOLUME_L"].round(2)
    out["SWSI_L_PER_ACTIVE_MONTH"] = out["SWSI_L_PER_ACTIVE_MONTH"].round(2)

    # Rename ITEM CODE -> ITEM_CODE (matching your requested names)
    out = out.rename(columns={"ITEM CODE": "ITEM_CODE"})

    # Final column order exactly as requested
    out = out[[
        "ITEM_CODE",
        "ITEM_DESCRIPTION",
        "SUPPLIER",
        "ITEM_TYPE",
        "ACTIVE_MONTHS",
        "TOTAL_UNITS_SOLD",
        "TOTAL_VOLUME_L",
        "SWSI_L_PER_ACTIVE_MONTH",
    ]]

    result = {"top_items": out.to_dict(orient="records")}
    return json.dumps(result, ensure_ascii=False) if as_json_string else result


swsi_result = compute_swsi_json(wine_liquor_df, top_n=20, as_json_string=False)  # returns dict
print(swsi_result)
```

Output and golden response:

{'top_items': [{'ITEM_CODE': '872737', 'ITEM_DESCRIPTION': 'Stone Lantern 1000', 'SUPPLIER': 'BACCHUS IMPORTERS LTD', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 7, 'TOTAL_UNITS_SOLD': 153916.0, 'TOTAL_VOLUME_L': 156586.25, 'SWSI_L_PER_ACTIVE_MONTH': 22369.46}, {'ITEM_CODE': '689113', 'ITEM_DESCRIPTION': 'Midnight Orchard 375', 'SUPPLIER': 'PRESTIGE BEVERAGE GROUP OF MD LLC', 'ITEM_TYPE': 'LIQUOR', 'ACTIVE_MONTHS': 8, 'TOTAL_UNITS_SOLD': 168088.0, 'TOTAL_VOLUME_L': 126814.5, 'SWSI_L_PER_ACTIVE_MONTH': 15851.81}, {'ITEM_CODE': '796559', 'ITEM_DESCRIPTION': 'Blood Moon 750', 'SUPPLIER': 'REPUBLIC NATIONAL DISTRIBUTING CO', 'ITEM_TYPE': 'LIQUOR', 'ACTIVE_MONTHS': 10, 'TOTAL_UNITS_SOLD': 162369.0, 'TOTAL_VOLUME_L': 145138.5, 'SWSI_L_PER_ACTIVE_MONTH': 14513.85}, {'ITEM_CODE': '489713', 'ITEM_DESCRIPTION': 'Crimson Tide 1000', 'SUPPLIER': 'COPPER CANE LLC', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 6, 'TOTAL_UNITS_SOLD': 82598.0, 'TOTAL_VOLUME_L': 70231.88, 'SWSI_L_PER_ACTIVE_MONTH': 11705.31}, {'ITEM_CODE': '494990', 'ITEM_DESCRIPTION': 'Copper Comet 375', 'SUPPLIER': 'CELICAR LLC DBA TWIN VALLEY DISTILLERS', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 7, 'TOTAL_UNITS_SOLD': 124541.0, 'TOTAL_VOLUME_L': 71493.62, 'SWSI_L_PER_ACTIVE_MONTH': 10213.38}, {'ITEM_CODE': '53929', 'ITEM_DESCRIPTION': "TITO'S HANDMADE VODKA - 1.75L", 'SUPPLIER': 'FIFTH GENERATION INC', 'ITEM_TYPE': 'LIQUOR', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 28052.33, 'TOTAL_VOLUME_L': 49091.58, 'SWSI_L_PER_ACTIVE_MONTH': 2045.48}, {'ITEM_CODE': '82538', 'ITEM_DESCRIPTION': 'FRANZIA CHARD BIB - 5L', 'SUPPLIER': 'THE WINE GROUP', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 7918.25, 'TOTAL_VOLUME_L': 39591.25, 'SWSI_L_PER_ACTIVE_MONTH': 1649.64}, {'ITEM_CODE': '68519', 'ITEM_DESCRIPTION': 'GEKKEIKAN SAKE - 18L', 'SUPPLIER': 'LAPHAM SALES & MARKETING DBA LAPHAM', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 1614.0, 'TOTAL_VOLUME_L': 29052.0, 'SWSI_L_PER_ACTIVE_MONTH': 1210.5}, {'ITEM_CODE': '82520', 'ITEM_DESCRIPTION': 'FRANZIA CAB BIB - 5L', 'SUPPLIER': 'THE WINE GROUP', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 4343.25, 'TOTAL_VOLUME_L': 21716.25, 'SWSI_L_PER_ACTIVE_MONTH': 904.84}, {'ITEM_CODE': '35840', 'ITEM_DESCRIPTION': "BOWMAN'S VODKA - 1.75L", 'SUPPLIER': 'SAZERAC CO', 'ITEM_TYPE': 'LIQUOR', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 12290.72, 'TOTAL_VOLUME_L': 21508.76, 'SWSI_L_PER_ACTIVE_MONTH': 896.2}, {'ITEM_CODE': '75906', 'ITEM_DESCRIPTION': 'BLACK BOX MONTEREY CHARD BIB - 3L', 'SUPPLIER': 'CONSTELLATION BRANDS', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 7154.99, 'TOTAL_VOLUME_L': 21464.97, 'SWSI_L_PER_ACTIVE_MONTH': 894.37}, {'ITEM_CODE': '75841', 'ITEM_DESCRIPTION': 'BLACK BOX CENTRAL COAST CAB-BIB - 3L', 'SUPPLIER': 'CONSTELLATION BRANDS', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 7011.76, 'TOTAL_VOLUME_L': 21035.28, 'SWSI_L_PER_ACTIVE_MONTH': 876.47}, {'ITEM_CODE': '85995', 'ITEM_DESCRIPTION': 'WOODBRIDGE CHARD - 1.5L', 'SUPPLIER': 'CONSTELLATION BRANDS', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 13084.37, 'TOTAL_VOLUME_L': 19626.56, 'SWSI_L_PER_ACTIVE_MONTH': 817.77}, {'ITEM_CODE': '83347', 'ITEM_DESCRIPTION': 'BOTA BOX-P/GRIG(3/CS) - 3L', 'SUPPLIER': 'DELICATO FAMILY VINEYARDS', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 5889.33, 'TOTAL_VOLUME_L': 17667.99, 'SWSI_L_PER_ACTIVE_MONTH': 736.17}, {'ITEM_CODE': '86445', 'ITEM_DESCRIPTION': 'FRANZIA P/GRIG COL- 5L', 'SUPPLIER': 'THE WINE GROUP', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 3490.0, 'TOTAL_VOLUME_L': 17450.0, 'SWSI_L_PER_ACTIVE_MONTH': 727.08}, {'ITEM_CODE': '89010', 'ITEM_DESCRIPTION': 'CARLO ROSSI BURGUNDY - 4L', 'SUPPLIER': 'E & J GALLO WINERY', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 4360.0, 'TOTAL_VOLUME_L': 17440.0, 'SWSI_L_PER_ACTIVE_MONTH': 726.67}, {'ITEM_CODE': '85308', 'ITEM_DESCRIPTION': 'FRANZIA CRISP WHITE BIB - 5L', 'SUPPLIER': 'THE WINE GROUP', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 3439.0, 'TOTAL_VOLUME_L': 17195.0, 'SWSI_L_PER_ACTIVE_MONTH': 716.46}, {'ITEM_CODE': '83293', 'ITEM_DESCRIPTION': 'BOTA BOX-CHARD(3CS) - 3L', 'SUPPLIER': 'DELICATO FAMILY VINEYARDS', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 5566.21, 'TOTAL_VOLUME_L': 16698.63, 'SWSI_L_PER_ACTIVE_MONTH': 695.78}, {'ITEM_CODE': '82244', 'ITEM_DESCRIPTION': 'FRANZIA CHABLIS BIB - 5L', 'SUPPLIER': 'THE WINE GROUP', 'ITEM_TYPE': 'WINE', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 3202.0, 'TOTAL_VOLUME_L': 16010.0, 'SWSI_L_PER_ACTIVE_MONTH': 667.08}, {'ITEM_CODE': '40932', 'ITEM_DESCRIPTION': 'PINNACLE VODKA - 1.75L', 'SUPPLIER': 'JIM BEAM BRANDS CO', 'ITEM_TYPE': 'LIQUOR', 'ACTIVE_MONTHS': 24, 'TOTAL_UNITS_SOLD': 8750.4, 'TOTAL_VOLUME_L': 15313.2, 'SWSI_L_PER_ACTIVE_MONTH': 638.05}]}