The csv module can turn text rows into dictionaries, so a small report can filter and summarize records without manual splitting.

CSV Inventory Report

csv_inventory_report.py
import csv
from io import StringIO

csv_text = """sku,name,stock
A1,notebook,6
B2,pencil,3
C3,folder,12
"""

min_stock = 

reader = csv.DictReader(StringIO(csv_text))
included = []
for row in reader:
    stock = int(row["stock"])
    if stock < min_stock:
        continue
    included.append(row["name"] + ":" + str(stock))

print("included=" + ",".join(included))
print("count=" + str(len(included)))
import csv
from io import StringIO

csv_text = """sku,name,stock
A1,notebook,6
B2,pencil,3
C3,folder,12
"""

min_stock = 

reader = csv.DictReader(StringIO(csv_text))
included = []
for row in reader:
    stock = int(row["stock"])
    if stock < min_stock:
        continue
    included.append(row["name"] + ":" + str(stock))

print("included=" + ",".join(included))
print("count=" + str(len(included)))
import csv
from io import StringIO

csv_text = """sku,name,stock
A1,notebook,6
B2,pencil,3
C3,folder,12
"""

min_stock = 

reader = csv.DictReader(StringIO(csv_text))
included = []
for row in reader:
    stock = int(row["stock"])
    if stock < min_stock:
        continue
    included.append(row["name"] + ":" + str(stock))

print("included=" + ",".join(included))
print("count=" + str(len(included)))
CSV dictionary rows `csv.DictReader` reads the header row and gives each later row named fields.