At-a-Glance đź‘€Â
This Python script enriches an Excel file of wine data by connecting to a PostgreSQL database and retrieving missing wine scores, reviewers, and tasting notes. It’s designed to automate the process of updating historical wine data files with detailed scoring information.
đź”— App Link:
Excel-Wine-Score-Updater-PostgreSQL-Integration
Fideladdi • Updated Apr 16, 2025
Purpose
🔍 What It Does
- Loads an Excel file containing wine entries
- Iterates through each row
- Skips non-vintage entries (
NV
)
- Queries a PostgreSQL database usingÂ
wine_name
 andÂvintage
- If a match is found:
- Updates theÂ
score
,Âreviewer
, andÂwine_notes
 columns - Flags updated rows in column 17
📥 Input
- Excel file:Â
Scores Only_List 3.xlsx
- Required columns:
- Column 3 – Vintage
- Column 4 – Wine Name
- Columns 8–10 – (Score, Reviewer, Notes)
📤 Output
- Excel file:
Scores and notes - Wine April 2025 TEST.xlsx
(saved in the same directory or custom output path)
đź› Requirements
Install the required Python packages:
pip install pandas sqlalchemy openpyxl psycopg2-binary