[{"data":1,"prerenderedAt":234},["ShallowReactive",2],{"topic:data-validation":3},[4,14,21,26,32,38,43,49,55,60,66,71,77,83,88,93,99,104,109,114,119,124,129,134,139,145,150,155,161,166,172,177,182,187,192,197,202,207,213,219,224,229],{"path":5,"title":6,"description":7,"type":8,"topics":9,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-cells-containing-text-with-openpyxl","Highlight Cells Containing Specific Text with openpyxl","Colour every status that mentions \"late\", every reference that begins with INV, or every note containing any word from a list. Write containsText, beginsWith and formula rules with openpyxl, choose between case-insensitive SEARCH and case-sensitive FIND, match whole words so \"late\" does not match \"calculate\", and drive the keyword from a cell.","how-to",[10,11,12],"conditional-formatting","openpyxl","data-validation",null,{"path":15,"title":16,"description":17,"type":8,"topics":18,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fdetect-outliers-in-excel-data-with-pandas","Detect Outliers in Excel Data with pandas","Find the invoice for 48,000 in a column of 400s, the negative quantity and the delivery that took 90 days. Compare IQR fences, z-scores and median-based robust scores on the same data, detect outliers within each group, add business rules, and flag rows in the workbook for review instead of deleting them.",[12,19,20],"data-cleaning","pandas",{"path":22,"title":23,"description":24,"type":8,"topics":25,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Ffind-near-duplicate-names-within-one-excel-column","Find Near-Duplicate Names Within One Excel Column","Customer and supplier lists collect variants of the same name — \"ACME Ltd\", \"Acme Limited\", \"A.C.M.E. Ltd.\" — that exact de-duplication misses. Normalise names, compare every pair with rapidfuzz, group matches into clusters, choose a canonical spelling, block by first letter to scale to tens of thousands of names, and write a review sheet so a person confirms each merge.",[19,12],{"path":27,"title":28,"description":29,"type":8,"topics":30,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fextracting-data-from-messy-excel-sheets\u002Fread-dropdown-lists-from-an-existing-workbook","Read Dropdown Lists and Validation Rules from an Existing Workbook","Find out what a template's dropdowns allow — the regions, statuses and priority codes behind each data validation rule — and check the data people entered against them. Read validation rules with openpyxl, resolve inline lists, range references and named ranges to real values, and report every cell that breaks its rule.",[31,12,11],"messy-sheets",{"path":33,"title":34,"description":35,"type":8,"topics":36,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fhandling-missing-data-in-excel-reports\u002Ffind-and-report-missing-values-in-an-excel-file","Find and Report Missing Values in an Excel File","Audit an Excel file for gaps before you use it — per-column null counts, disguised blanks like n\u002Fa and dashes, missing-value patterns, and a formatted report of what is absent.",[37,12,20],"missing-data",{"path":39,"title":40,"description":41,"type":8,"topics":42,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fhandling-missing-data-in-excel-reports\u002Fflag-rows-with-too-many-missing-values","Flag Rows with Too Many Missing Values","Find the incomplete records in an Excel sheet before they distort a report: count missing values per row with pandas, treat placeholders like \"n\u002Fa\", \"-\" and \"TBC\" as missing, weight required fields more than optional ones, choose a threshold, group the flagged rows by who entered them, and write a workbook where incomplete rows are highlighted and listed for follow-up.",[37,12],{"path":44,"title":45,"description":46,"type":8,"topics":47,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Fvalidate-a-merge-to-avoid-duplicate-rows","Validate a pandas Merge to Avoid Duplicate Rows","A duplicate key in a lookup sheet makes a pandas merge silently add rows and inflate totals. Use merge's validate argument, indicator column and before-and-after checks to catch duplicate keys, unmatched rows and missing keys that match each other before a report goes out.",[48,12,20],"joins-and-lookups",{"path":50,"title":51,"description":52,"type":8,"topics":53,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmoving-data-between-excel-and-databases\u002Fcompare-an-excel-file-with-a-database-table","Compare an Excel File with a Database Table","Find every difference between a spreadsheet and the database table it is supposed to match: normalise both sides so formatting noise does not count, outer-join on the key, list rows only in Excel or only in the database, compare fields with tolerances for numbers and dates, write a highlighted difference report, and preview the SQL that would bring the table in line.",[54,12],"data-sources",{"path":56,"title":57,"description":58,"type":8,"topics":59,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmoving-data-between-excel-and-databases\u002Fexport-database-lookup-tables-as-excel-dropdown-lists","Export Database Lookup Tables as Excel Dropdown Lists","Build an Excel input template whose dropdowns come straight from the database: read the active cost centres, projects and expense types, write them to a hidden lists sheet, give each list a named range, attach data validation to the input columns, show codes with their descriptions while storing a code that maps back cleanly, refresh the lists in an existing template, and check the returned file against the database.",[54,12],{"path":61,"title":62,"description":63,"type":64,"topics":65,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python","Validating Excel Data with Python","Two kinds of spreadsheet validation with Python — pandas checks that reject bad data before it reaches a report, and openpyxl rules that stop bad data being typed in the first place.","guide",[12],{"path":67,"title":68,"description":69,"type":8,"topics":70,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fadd-dropdown-data-validation-to-excel-with-openpyxl","Add Dropdown Data Validation to Excel with openpyxl","Write Excel dropdown lists from Python with openpyxl DataValidation — inline lists, lists from a lookup sheet or named range, custom error messages, and the 255-character limit.",[12,11],{"path":72,"title":73,"description":74,"type":8,"topics":75,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fanonymise-personal-data-in-an-excel-file-with-python","Anonymise Personal Data in an Excel File with Python","Prepare a workbook of customer or employee records for sharing: drop direct identifiers, replace IDs with keyed pseudonyms that stay consistent across files, generalise ages and postcodes, scrub emails and phone numbers out of free text, check how many people share each combination of details, and scan the output for anything left behind.",[12,76],"protection-and-sharing",{"path":78,"title":79,"description":80,"type":8,"topics":81,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fbuild-a-data-quality-scorecard-for-an-excel-file","Build a Data Quality Scorecard for an Excel File","Score an incoming Excel file on data quality with pandas, column by column: completeness, validity against a type, pattern or range, uniqueness for key columns, consistency with an allowed list and freshness of dates — declared once in a small rules table, combined into a score per column and for the file, compared with last month's file, and written as a colour-coded scorecard with sample failing values.",[12,82],"report-layouts",{"path":84,"title":85,"description":86,"type":8,"topics":87,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fcheck-excel-data-types-with-pandas","Check Excel Data Types with pandas","Find out what pandas actually read from a spreadsheet — object columns hiding mixed types, numbers stored as text, Excel date serials — and coerce them with a record of every failure.",[12,20],{"path":89,"title":90,"description":91,"type":8,"topics":92,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fcheck-references-between-excel-sheets","Check References Between Excel Sheets with pandas","Find orders that point at customers who do not exist, products missing from the price list and lookup sheets with duplicate keys. Check every reference from one sheet to another with pandas, normalise keys so near-misses are caught, report the Excel rows that break a reference, and flag master rows nothing uses.",[12,48,20],{"path":94,"title":95,"description":96,"type":8,"topics":97,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fcheck-that-totals-in-a-report-add-up","Check That Totals in a Report Add Up","Automatically check a finished Excel report before it is sent: every total row equals the sum of the rows above it, every total column equals the sum across, the grand total cross-foots both ways, the summary sheet agrees with the detail sheet, and differences within a rounding tolerance are accepted — with each failure reported by sheet and cell so it can be fixed.",[12,98],"excel-formulas",{"path":100,"title":101,"description":102,"type":8,"topics":103,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fcompare-two-excel-files-for-differences-with-python","Compare Two Excel Files for Differences with Python","Diff two versions of a workbook with pandas — added, removed and changed rows keyed on an identifier, a cell-level change list, and a colour-coded difference report in Excel.",[48,12,20],{"path":105,"title":106,"description":107,"type":8,"topics":108,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fcreate-dependent-dropdown-lists-in-excel-with-python","Create Dependent Dropdown Lists in Excel with Python","Build cascading dropdowns — pick a category, then only its subcategories are offered — from a mapping table in Python: a hidden lookup sheet, one named range per category with safe names, a data validation list for the first column and an INDIRECT-based list for the second, error messages, and a Python check that existing rows still match.",[12,11],{"path":110,"title":111,"description":112,"type":8,"topics":113,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fdetect-possible-duplicate-invoices","Detect Possible Duplicate Invoices","Find supplier invoices that may have been entered or paid twice in an Excel payables export: exact duplicates, invoice numbers that differ only in formatting such as \"INV-001042\" and \"1042\", the same amount from the same supplier within a few days under a different number, and near-identical supplier names — scored, explained and listed for review before the payment run.",[12,19],{"path":115,"title":116,"description":117,"type":8,"topics":118,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fdetect-schema-drift-between-monthly-excel-files","Detect Schema Drift Between Monthly Excel Files","Catch the silent changes in a recurring Excel export before they break a report: take a schema snapshot of each file — columns, order, types, blanks, categories and ranges — compare it with last month's, flag added, removed and probably renamed columns, type changes, new category values and shifted ranges, and stop the pipeline with a readable drift report when a change matters.",[12],{"path":120,"title":121,"description":122,"type":8,"topics":123,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Ffind-duplicate-rows-in-excel-with-python","Find Duplicate Rows in Excel with Python","Detect exact and near-duplicate rows in a spreadsheet with pandas — key-based duplicates, whitespace and case traps, duplicate groups with counts, and a report you can send back.",[19,12,20],{"path":125,"title":126,"description":127,"type":8,"topics":128,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Ffind-gaps-in-a-numbered-sequence-with-pandas","Find Gaps in a Numbered Sequence with pandas","Check that invoice, cheque or ticket numbers in an Excel export run without gaps: extract the number from IDs such as INV-2026-000123, check each series separately, list missing numbers as compact ranges, catch duplicates and numbers issued out of date order, and write an exceptions report.",[12,20],{"path":130,"title":131,"description":132,"type":8,"topics":133,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fhighlight-invalid-cells-in-excel-with-python","Highlight Invalid Cells in Excel with Python","Mark the exact cells that failed validation with openpyxl — a red fill, a comment explaining the rule, a legend and an issues sheet — so a submitter can fix the file in minutes.",[12,10,11],{"path":135,"title":136,"description":137,"type":8,"topics":138,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fprofile-an-excel-dataset-with-pandas","Profile an Excel Dataset with pandas","Get to know a workbook before cleaning or loading it: one row per column with its type, blanks, distinct values, most common values, ranges and text lengths; columns that mix numbers and text; value patterns such as \"AA-9999\"; columns that could be a unique key; and the whole profile written to a workbook people can read.",[12,37],{"path":140,"title":141,"description":142,"type":8,"topics":143,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Freconcile-excel-totals-with-control-totals","Reconcile Excel Totals Against Control Totals with Python","Prove that an Excel import or report is complete by reconciling it with control totals — record counts, amount totals and hash totals supplied by the source system — overall and per group, at every stage of a pipeline, with money compared in cents and a reconciliation sheet that shows exactly where figures diverge.",[12,144,20],"pivots-and-summaries",{"path":146,"title":147,"description":148,"type":8,"topics":149,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Frun-a-benfords-law-check-on-excel-data","Run a Benford's Law Check on Excel Data","Test whether the leading digits of amounts in an Excel ledger follow Benford's law: extract first digits correctly, compare observed and expected frequencies, measure conformity with the mean absolute deviation and a chi-square test, drill into over-represented digits such as amounts just below an approval limit, and chart the result in Excel.",[12,20],{"path":151,"title":152,"description":153,"type":8,"topics":154,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fvalidate-check-digits-in-excel-data-with-python","Validate Check Digits in Excel Data with Python","Barcodes, IBANs and many reference numbers carry a check digit that catches most typing errors. Validate them in a spreadsheet with Python: EAN-13 and other GTIN barcodes, IBAN mod-97 checks, the Luhn algorithm used by payment cards and many IDs, reading the columns as text so no digit is lost, cross-checking against python-stdnum, and highlighting invalid cells for the people who fix them.",[12],{"path":156,"title":157,"description":158,"type":8,"topics":159,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fvalidate-dates-fall-within-an-expected-period","Validate Dates Fall Within an Expected Period","Check the dates in a monthly Excel import before loading it: rows outside the reporting month, dates in the future, years with a typo such as 2062 or 1926, day and month swapped, numbers that are really Excel serials, text that is not a date at all, and transactions on days the business was closed — each row tagged with the reason and the likely correct date where one can be inferred.",[12,160],"dates-and-times",{"path":162,"title":163,"description":164,"type":8,"topics":165,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fvalidate-email-and-phone-formats-in-excel-data","Validate Email and Phone Formats in Excel Data with Python","Check the email addresses and phone numbers in a contact sheet before importing it — a quick regex screen, email-validator for real address syntax, phonenumbers for national and international formats, normalised values for deduplication, and a report of invalid cells with their spreadsheet row numbers.",[12,19,20],{"path":167,"title":168,"description":169,"type":8,"topics":170,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fvalidate-excel-columns-before-import-with-pandas","Validate Excel Columns Before Import with pandas","Check an incoming workbook's sheet, headers, column order and required fields with pandas before a single row reaches your pipeline — with clear, actionable failure messages.",[12,171,20],"reading-excel",{"path":173,"title":174,"description":175,"type":8,"topics":176,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fvalidate-excel-data-with-pandera-schemas","Validate Excel Data with pandera Schemas","Declare a schema for a spreadsheet and enforce it: column types, ranges, regex checks, uniqueness, cross-column rules, lazy validation and a readable error report.",[12,20],{"path":178,"title":179,"description":180,"type":8,"topics":181,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fvalidate-excel-rows-with-pydantic","Validate Excel Rows with pydantic Models","Describe what a valid row looks like once, as a pydantic model, and check every row of a sheet against it. Map Excel headers to fields with aliases, constrain values, normalise text before checking, add rules that span columns, and turn validation errors into a report that names the Excel row, column and value.",[12,11],{"path":183,"title":184,"description":185,"type":8,"topics":186,"kind":13},"\u002Fadvanced-data-transformation-and-cleaning\u002Fvalidating-excel-data-with-python\u002Fvalidate-parent-child-codes-in-a-hierarchy","Validate Parent-Child Codes in a Hierarchy","Check a parent-child table maintained in Excel — an account tree, cost-centre structure or product category list — before anything is rolled up through it: duplicate codes, parents that do not exist, more than one top node, cycles and self-references, unreachable branches, depth limits, code-format rules that tie children to parents, and postings to non-leaf nodes, all reported with the Excel row to fix.",[12],{"path":188,"title":189,"description":190,"type":8,"topics":191,"kind":13},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Freconcile-a-stock-count-against-system-inventory","Reconcile a Stock Count Against System Inventory","Compare a physical stock count with the inventory system in pandas: combine count sheets from several counters, normalise SKU codes, total items found in more than one place, outer-join to the system quantities with an indicator, value each variance at cost, pick lines to recount by value and percentage thresholds, and produce an adjustment summary and Excel workbook.",[82,12],{"path":193,"title":194,"description":195,"type":8,"topics":196,"kind":13},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fsend-out-budget-templates-and-consolidate-the-returns","Send Out Budget Templates and Consolidate the Returns","Run the annual budget round from Python: generate one pre-filled budget workbook per cost centre with locked formulas, validated input cells and a hidden identity sheet, then read the returned files back, check that each is the right template for the right cost centre with sensible numbers, consolidate them into one table and keep a tracker of who has returned what.",[82,12],{"path":198,"title":199,"description":200,"type":8,"topics":201,"kind":13},"\u002Fautomating-reporting-workflows\u002Fbuilding-multi-sheet-excel-dashboards\u002Fadd-a-data-dictionary-sheet-to-an-excel-report","Add a Data Dictionary Sheet to an Excel Report","Document every column of a multi-sheet Excel report in a generated data dictionary sheet: descriptions kept next to the code, types, units and number formats, example values, blank counts and ranges profiled from the data, links to each sheet, a check that fails on undocumented columns, and a dictionary for a workbook you did not build.",[82,12],{"path":203,"title":204,"description":205,"type":8,"topics":206,"kind":13},"\u002Fautomating-reporting-workflows\u002Fbuilding-multi-sheet-excel-dashboards\u002Fadd-slicer-style-filters-to-an-excel-dashboard","Add a Dropdown Filter That Drives an Excel Dashboard","Give an Excel dashboard a slicer-like control from Python — a data validation dropdown fed by a hidden list, an \"All\" option, SUMIFS formulas and a chart that follow the selection, and a second filter combined with the first — because native slicers cannot be written by openpyxl or XlsxWriter.",[82,12,98],{"path":208,"title":209,"description":210,"type":8,"topics":211,"kind":13},"\u002Fautomating-reporting-workflows\u002Ferror-handling-and-logging-in-excel-automation\u002Fvalidate-an-excel-report-before-sending-it","Validate an Excel Report Before Sending It","The last gate before delivery — check the file exists and is a real workbook, the sheets and rows are there, totals are plausible, and this run agrees with the last one.",[212,12],"reliable-jobs",{"path":214,"title":215,"description":216,"type":8,"topics":217,"kind":13},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fimport-an-excel-file-into-django-models","Import an Excel File into Django Models","Load a spreadsheet of products, customers or prices into a Django database the safe way: read every cell as text, validate each row with the model's own full_clean, report errors by Excel row number, reject duplicate keys in the file, create missing related objects, upsert everything in one transaction with bulk_create, and return an error workbook the uploader can fix.",[218,12],"web-apps",{"path":220,"title":221,"description":222,"type":8,"topics":223,"kind":13},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fvalidate-an-uploaded-excel-file-in-a-web-app","Validate an Uploaded Excel File Before Processing It in a Web App","Check an uploaded workbook in layers, cheapest first — the bytes, the zip container, then the rows — so renamed CSVs, old .xls files, password-protected workbooks, macros, external links and compression bombs are refused in under a millisecond, and data errors come back as a list of exact cells the user can fix.",[218,12],{"path":225,"title":226,"description":227,"type":8,"topics":228,"kind":13},"\u002Fgetting-started-with-python-excel-automation\u002Fworking-with-excel-formulas-in-python\u002Faudit-every-formula-in-a-workbook-with-python","Audit Every Formula in a Workbook with Python","Build an inventory of every formula in a workbook — which functions it uses, which sheets and external files it depends on, which numbers are hard-coded in it — then find the inconsistent formula in a column of identical ones and the value someone typed over a formula. Output the audit as its own sheet.",[98,12,11],{"path":230,"title":231,"description":232,"type":8,"topics":233,"kind":13},"\u002Fgetting-started-with-python-excel-automation\u002Fworking-with-excel-formulas-in-python\u002Ffind-formula-errors-in-a-workbook-with-python","Find #REF!, #DIV\u002F0! and Other Formula Errors in a Workbook","pandas turns formula errors into NaN, so a broken workbook can look merely incomplete. Scan every sheet with openpyxl for cells whose cached value is an error, catch #REF! inside formula text even without a recalculation, and fail a report job before it sends a workbook full of errors.",[98,12,11],1790972052271]