
Stop Using VLOOKUP: How I Automate 4 Hours of Excel Work in 4 Seconds with Python
We have all been there. It's Friday afternoon, and you have to generate the "Weekly Sales Report." This involves: Opening 5 different CSV files sent by 5 different regional managers. Copy-pasting them into one master sheet. Cleaning up the date formats because John in Sales sent his as DD-MM-YYYY but the system needs MM-DD-YYYY. Running a VLOOKUP against the "Product Master" sheet to get prices. Creating a Pivot Table. If you are lucky, this takes an hour. If you are unlucky, Excel crashes because you hit the 1,048,576 row limit. In 2026, manual spreadsheet wrangling is obsolete. Here is how I replaced this entire workflow with a Python script using Pandas. 1. The Setup: Ingesting Data instantly Instead of opening files one by one, we use Python's glob library to find all files in a folder and read them into a Pandas DataFrame. import pandas as pd import glob Find all CSVs files = glob.glob("sales_data/*.csv") Read and combine them in one line df = pd.concat([pd.read_csv(f) fo
Continue reading on Dev.to Python
Opens in a new tab


