[{"data":1,"prerenderedAt":1115},["ShallowReactive",2],{"topic:pandas":3},[4,13,19,25,31,37,42,47,52,58,64,69,75,80,86,91,96,101,106,111,116,121,126,131,136,142,148,153,158,164,169,174,179,184,189,194,199,204,209,214,219,224,230,235,240,246,251,256,261,266,271,276,281,286,291,296,301,306,311,316,321,326,331,336,342,347,352,357,362,367,372,377,382,387,392,397,402,408,413,418,423,428,433,438,443,448,453,458,463,468,473,478,484,489,494,499,504,509,514,519,524,529,534,539,545,550,555,560,565,570,575,581,587,592,597,602,607,612,617,622,627,632,637,642,647,652,657,662,667,672,677,682,687,693,698,703,708,713,718,723,728,733,740,746,751,756,761,766,771,776,781,786,791,796,801,806,811,816,821,826,831,836,841,846,851,858,863,869,875,881,886,891,896,901,906,911,916,921,926,931,936,941,946,951,956,961,966,971,976,981,986,991,996,1001,1006,1011,1016,1021,1027,1032,1037,1042,1047,1052,1057,1063,1068,1073,1078,1084,1089,1094,1099,1104,1110],{"path":5,"title":6,"description":7,"type":8,"topics":9,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning","Advanced Data Transformation and Cleaning for Excel Automation","Build production-grade Python pipelines that clean, validate, merge, and format Excel data with pandas and openpyxl — staged, testable, and reproducible.","overview",[10,11],"data-cleaning","pandas",null,{"path":14,"title":15,"description":16,"type":17,"topics":18,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas","Cleaning Excel Data With Pandas: A Production Workflow","Turn messy Excel exports into reliable reporting inputs with pandas: load as text, normalize headers and types, drop noise, deduplicate, validate, and export.","guide",[10,11],{"path":20,"title":21,"description":22,"type":23,"topics":24,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fclean-mixed-currency-amounts-into-amount-and-currency-columns","Clean Mixed-Currency Amounts into Amount and Currency Columns","Turn an Excel column of amounts typed with their currency — \"€1.234,50\", \"USD 1,200\", \"1200 GBP\", \"£950\", \"CHF 1'250.00\", \"(45.00) EUR\" — into a numeric amount column and an ISO currency code column with pandas: map symbols and codes, resolve the ambiguous dollar sign, detect decimal commas, keep negative signs and parentheses, convert to one reporting currency, and list what could not be read.","how-to",[10,11],{"path":26,"title":27,"description":28,"type":23,"topics":29,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fcoalesce-several-excel-columns-into-one-with-pandas","Coalesce Several Excel Columns into One with pandas","Take the first non-empty value from several columns — Mobile, else Work phone, else Home phone — the way SQL's COALESCE or a chain of nested IFs in Excel does: bfill across columns, combine_first for two columns, treating blanks and placeholder text as missing, recording which column supplied each value, and flagging rows where the sources disagree.",[10,30,11],"missing-data",{"path":32,"title":33,"description":34,"type":23,"topics":35,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fconvert-currency-strings-to-numbers-with-pandas","Convert Currency Strings Like \"$1,234.56\" and \"(500)\" to Numbers with pandas","Amount columns exported as text — \"$1,234.56\", \"(1,200.00)\", \"-€50\", \"1.234,56 EUR\", \"750.00-\" or \"100.00 CR\" — cannot be summed. Parse every common currency format into a signed number and a separate currency code, report the values that do not parse, and write real numbers back to Excel.",[10,11,36],"number-formats",{"path":38,"title":39,"description":40,"type":23,"topics":41,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fconvert-excel-text-columns-to-numbers-with-pandas","Convert Excel Text Columns to Numbers with pandas","Numbers stored as text will not sum. Convert them in pandas — currency symbols, thousands separators, European decimals, parentheses negatives, and reporting what failed.",[10,11],{"path":43,"title":44,"description":45,"type":23,"topics":46,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fconvert-percentage-strings-to-numbers-with-pandas","Convert Percentage Strings Like \"12.5%\" to Numbers with pandas","A rate column that mixes typed text like \"12.5%\" with real percentage cells that pandas reads as 0.125 cannot be averaged. Convert every form — \"12.5%\", \"12,5 %\", \"-3%\", \"25 bp\", fractions and bare numbers — to one consistent fraction, flag the ambiguous values, and write them back with a percent format.",[10,11,36],{"path":48,"title":49,"description":50,"type":23,"topics":51,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fconvert-trailing-minus-and-cr-dr-amounts-with-pandas","Convert Trailing Minus and CR\u002FDR Amounts with pandas","Turn amounts exported by SAP, Oracle and bank systems into signed numbers: trailing minus signs like 1,234.56-, accounting brackets, CR and DR suffixes, a separate debit\u002Fcredit indicator column, European 1.234,56 formats, and a check that nothing was left as text.",[10,11],{"path":53,"title":54,"description":55,"type":23,"topics":56,"kind":12},"\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.",[57,10,11],"data-validation",{"path":59,"title":60,"description":61,"type":23,"topics":62,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fextract-numbers-and-codes-from-text-with-pandas","Extract Numbers and Codes from Text with pandas","Pull order numbers, SKUs, quantities and amounts out of free-text cells like \"Re: PO-10442, 3 x SKU AB-1200 @ $12.50\". Use str.extract with named groups for one match per cell, extractall for many, fullmatch to validate codes, and a report of the rows where nothing matched.",[10,11,63],"formula-equivalents",{"path":65,"title":66,"description":67,"type":23,"topics":68,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Ffilter-excel-rows-by-condition-with-pandas","Filter Excel Rows by Condition with pandas","Keep only the rows you need from a sheet: boolean masks, combining conditions with & | ~ and the brackets they need, isin, between and date ranges, text matching that does not crash on blanks, query strings, filters defined in a config file, and deleting rows from a formatted workbook in place with openpyxl.",[10,11],{"path":70,"title":71,"description":72,"type":23,"topics":73,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Ffix-garbled-characters-in-excel-data","Fix Garbled Characters Like \"CafÃ©\" and \"â€™\" in Excel Data","Text that shows \"MÃ¼ller\", \"â‚¬100\" or \"â€™\" was UTF-8 read as Windows-1252 somewhere upstream. Detect the affected cells, repair them with a one-line re-encode or with ftfy, avoid the repairs that damage correct text, recognise what cannot be recovered, and stop it happening again.",[10,74,11],"file-formats",{"path":76,"title":77,"description":78,"type":23,"topics":79,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Ffix-the-capitalisation-of-names-with-exceptions-in-pandas","Fix the Capitalisation of Names with Exceptions in pandas","Turn SHOUTED and lower-case names in an Excel list into proper names without the mistakes str.title makes: O'Brien instead of O'brien, McDonald, hyphenated surnames, particles such as van and de, generational suffixes like III, company suffixes and acronyms such as LLC and UK, leaving already mixed-case names alone, and a review list of everything that changed.",[10,11],{"path":81,"title":82,"description":83,"type":23,"topics":84,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fkeep-the-latest-record-per-key-with-pandas","Keep the Latest Record per Key When Deduplicating with pandas","A customer export lists the same customer several times as their details changed. Keep only the most recent row per customer with sort_values and drop_duplicates, break ties on equal timestamps, handle dates stored as text and missing dates, and avoid groupby().last(), which quietly mixes values from different rows.",[10,11,85],"dates-and-times",{"path":87,"title":88,"description":89,"type":23,"topics":90,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fnormalise-postcodes-and-zip-codes-with-pandas","Normalise Postcodes and ZIP Codes with pandas","Clean the postcode column of an international address list from Excel: restore the leading zeros Excel stripped from US ZIP codes and other numeric postcodes, format UK postcodes with the single space in the right place, handle ZIP+4, Dutch and Canadian formats, validate each value against its country's pattern, and list the ones that need a human.",[10,11],{"path":92,"title":93,"description":94,"type":23,"topics":95,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fpandas-drop-duplicates-from-excel-column","Pandas: Drop Duplicates From an Excel Column","Remove duplicate rows by a single Excel column with pandas drop_duplicates and the subset parameter — including keep options, NaN behavior, and pre-cleaning.",[10,11],{"path":97,"title":98,"description":99,"type":23,"topics":100,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fremove-blank-rows-from-excel-with-pandas","Remove Blank Rows From Excel With Pandas","Strip blank rows from an Excel file with pandas: dropna(how='all'), subset and thresh, whitespace-only cells, index resets, and writing the cleaned file back.",[10,11],{"path":102,"title":103,"description":104,"type":23,"topics":105,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fremove-duplicate-words-and-extra-punctuation-from-text","Remove Duplicate Words and Extra Punctuation from Text","Tidy free-text columns from Excel with pandas: remove accidentally repeated words such as \"the the\" while keeping genuine repeats like \"Bora Bora\", collapse runs of punctuation, fix spaces before commas and full stops, normalise curly quotes and dashes, strip leading and trailing junk, and keep a log of exactly which cells changed and how.",[10,11],{"path":107,"title":108,"description":109,"type":23,"topics":110,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fremove-non-printable-characters-from-excel-data","Remove Non-Printable Characters from Excel Data with Python","Find and remove the characters you cannot see in Excel text — carriage returns, tabs, bell and other control codes, soft hyphens, zero-width marks and leftover _x000D_ escapes — using Unicode categories, without damaging line breaks or emoji you want to keep.",[10,11],{"path":112,"title":113,"description":114,"type":23,"topics":115,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Freplace-values-in-an-excel-column-with-pandas","Replace Values in an Excel Column with pandas","Recode values in an Excel column with pandas — replace versus map, mapping tables kept in a workbook, regex replacements, per-column rules, numeric bands with case_when, and a report of values that no rule covered.",[10,11],{"path":117,"title":118,"description":119,"type":23,"topics":120,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fsplit-a-column-into-multiple-columns-with-pandas","Split a Column into Multiple Columns with pandas","The pandas version of Excel's Text to Columns: split names, codes and addresses on a delimiter, cap the number of pieces, extract parts with a regex, and turn multi-value cells into rows.",[10,11],{"path":122,"title":123,"description":124,"type":23,"topics":125,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fsplit-an-address-column-into-street-city-and-postcode","Split an Address Column into Street, City and Postcode","Break single-cell addresses from an Excel export into street, city, postcode and country columns with pandas: handle line breaks typed with Alt+Enter and comma-separated addresses, find the postcode with a pattern for each country, take the city from around it, keep extra lines such as building names, and send addresses the rules cannot split to a review list instead of guessing.",[10,11],{"path":127,"title":128,"description":129,"type":23,"topics":130,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fsplit-delimited-cell-values-into-rows-with-pandas","Split Delimited Cell Values into Rows with pandas","Turn cells like \"Red; Blue; Green\" or \"INV-1, INV-2\" into one row per value with str.split and explode: clean up spaces and empty items, split two parallel columns together (and handle the \"matching element counts\" error when they disagree), keep a link to the original row, count and pivot the results, and join them back into one cell when needed.",[10,11],{"path":132,"title":133,"description":134,"type":23,"topics":135,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fsplit-full-names-into-first-and-last-names-with-pandas","Split Full Names into First and Last Names with pandas","A single \"Name\" column holds \"Ada Lovelace\", \"Lovelace, Ada\", \"Dr. Grace Hopper\", \"Ludwig van Beethoven\" and \"Smith Jr., John\". Split it into first and last names with rules for commas, titles, suffixes and surname particles, keep the original, and flag the names no rule should guess about.",[10,11,63],{"path":137,"title":138,"description":139,"type":23,"topics":140,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fstandardise-category-values-with-a-mapping-table","Standardise Category Values with a Mapping Table in pandas","Turn \"N. America\", \"north america \", \"NA\" and \"USA\" into one region name using a mapping table kept in Excel, where the people who own the categories can maintain it. Normalise keys, check the table for conflicts, report unmapped values with counts and suggestions, and append new ones for review.",[10,141,11],"joins-and-lookups",{"path":143,"title":144,"description":145,"type":23,"topics":146,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fstandardise-excel-column-names-with-pandas","Standardise Excel Column Names with pandas","Turn messy Excel headers — stray spaces, line breaks, symbols, duplicates, blanks and dates as headers — into consistent snake_case names, map synonyms from different sources to one canonical schema, and check required columns before processing.",[10,147,11],"reading-excel",{"path":149,"title":150,"description":151,"type":23,"topics":152,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fstandardise-phone-numbers-in-excel-data-with-python","Standardise Phone Numbers in Excel Data with Python","Turn a column of phone numbers typed every possible way — spaces, brackets, (0), 00 prefixes, missing country codes, numbers mangled into floats by Excel — into one consistent format with pandas and the phonenumbers library: E.164 for systems, international or national format for people, validity and line-type checks, and a review list of numbers that cannot be trusted.",[10,11],{"path":154,"title":155,"description":156,"type":23,"topics":157,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcleaning-excel-data-with-pandas\u002Fstrip-whitespace-and-normalise-text-columns-with-pandas","Strip Whitespace and Normalise Text Columns with pandas","Trailing spaces break joins and group-bys silently. Clean Excel text columns in pandas — strip, collapse inner whitespace, non-breaking spaces, case folding and accents.",[10,11],{"path":159,"title":160,"description":161,"type":17,"topics":162,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data","Creating Pivot Tables from Excel Data with Pandas","Build pivot tables from Excel data in Python: ingest and clean a workbook, aggregate with pandas pivot_table, add totals, filter, and export a formatted report.",[163,11],"pivots-and-summaries",{"path":165,"title":166,"description":167,"type":23,"topics":168,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fadd-a-native-excel-pivot-table-with-python","Add a Native Excel Pivot Table with Python","Ship a real, refreshable Excel pivot table rather than a static grid — write the source as a table, drive Excel through xlwings on Windows, and the cross-platform alternatives.",[163,11],{"path":170,"title":171,"description":172,"type":23,"topics":173,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fadd-subtotals-and-grand-totals-to-a-pandas-pivot-table","Add Subtotals and Grand Totals to a pandas Pivot Table","pandas' margins=True adds only a grand total. Add Excel-style subtotal rows for each outer group of a multi-level pivot, compute them from the raw data so averages stay correct, and write them to Excel as bold rows or live SUBTOTAL formulas.",[163,11],{"path":175,"title":176,"description":177,"type":23,"topics":178,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fbin-values-into-ranges-with-pandas-cut","Bin Values into Ranges Like Excel FREQUENCY with pd.cut","Group order values, ages or delivery times into bands such as \"0-10\", \"10-50\" and \"over 100\". Use pd.cut with explicit edges and labels, decide which side of each band is closed, stop values outside the edges from silently becoming NaN, match Excel's FREQUENCY counts exactly, and use qcut for equal-sized groups.",[163,63,11],{"path":180,"title":181,"description":182,"type":23,"topics":183,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fbuild-a-cohort-retention-table-from-excel-data","Build a Cohort Retention Table from Excel Data","Turn an order export into the classic retention triangle: assign each customer to the month of their first order, count how many come back in each following month, convert counts to percentages, compare cohorts, weight an average retention curve correctly, and write a colour-scaled table to Excel.",[163,11],{"path":185,"title":186,"description":187,"type":23,"topics":188,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fbuild-a-crosstab-from-excel-data-with-pandas","Build a Crosstab from Excel Data with pandas","Count how often categories occur together in an Excel sheet with pandas.crosstab — frequency tables, row and column percentages, totals, sums instead of counts, banded numbers, categories with zero counts and missing values that silently drop rows — then write the result to Excel with percentage formats.",[163,11],{"path":190,"title":191,"description":192,"type":23,"topics":193,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fbuild-a-product-co-occurrence-matrix-from-order-lines","Build a Product Co-occurrence Matrix from Order Lines","Find out which products are bought together from an order-lines sheet: build an order × product incidence table, multiply it by its transpose to count co-occurrences, read the diagonal as order counts, rank pairs by support, confidence and lift, avoid the pitfalls of quantities and duplicate lines, and write a heatmap matrix and a top-pairs list to Excel.",[163,11],{"path":195,"title":196,"description":197,"type":23,"topics":198,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fbuild-an-rfm-customer-segmentation-from-excel-data","Build an RFM Customer Segmentation from Excel Data","Segment customers by recency, frequency and monetary value from an Excel order history: compute the three measures per customer, score them 1 to 5 with quantiles that survive ties, map score combinations to named segments such as Champions and At risk, summarise each segment, and write a workbook with a recency-by-frequency grid.",[163,11],{"path":200,"title":201,"description":202,"type":23,"topics":203,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fcalculate-moving-averages-with-pandas-rolling","Calculate Moving Averages with pandas rolling","Smooth daily sales with a 7-day moving average, per store, the way an Excel AVERAGE over a sliding range does. Learn why rolling(7) and rolling(\"7D\") differ when days are missing, what min_periods does to the first rows, trailing versus centred windows, and how to roll within groups without scrambling rows.",[163,85,11],{"path":205,"title":206,"description":207,"type":23,"topics":208,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fcalculate-percent-of-total-per-group-in-pandas","Calculate Percent of Total per Group in pandas","Show each product's share of its region's sales, each region's share of the company, and a crosstab where every row adds to 100%. Use groupby transform for shares within groups, crosstab normalize for tables, keep rows with missing groups, and round shares so they still add up to exactly 100%.",[163,11,63],{"path":210,"title":211,"description":212,"type":23,"topics":213,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fcompare-two-periods-side-by-side-in-a-pivot","Compare Two Periods Side by Side in a Pivot","Build the classic \"this period versus last period\" table from Excel sales data with pandas: choose comparable periods (same month last year, month to date versus the same days last month), pivot them side by side, compute change and percentage change that cope with new and discontinued products, rank the biggest movers, show each line's contribution to the total change, and write it to Excel with coloured arrows.",[163,11],{"path":215,"title":216,"description":217,"type":23,"topics":218,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fcount-distinct-values-per-group-in-pandas","Count Distinct Values per Group in pandas","Count unique customers per region, distinct products per order or active users per month — the \"Distinct Count\" that Excel pivot tables only offer through the Data Model. Use nunique, decide how blanks, case and spacing count, get several distinct counts at once, and avoid adding distinct counts across groups.",[163,63,11],{"path":220,"title":221,"description":222,"type":23,"topics":223,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fcreate-pivot-table-from-excel-with-pandas","Create a Pivot Table from Excel with Pandas","Create a pivot table from an Excel file with pandas: read the workbook, aggregate with pivot_table using index, columns, values and aggfunc, then export the result.",[163,11],{"path":225,"title":226,"description":227,"type":23,"topics":228,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fexport-pandas-pivot-table-to-excel-formatted","Export a Pandas Pivot Table to Excel (Formatted)","Build a pandas pivot_table, flatten its MultiIndex, export with to_excel, then add a styled header, number formats, and a grand-total row with openpyxl.",[163,229,11],"writing-excel",{"path":231,"title":232,"description":233,"type":23,"topics":234,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fget-the-top-n-rows-per-group-in-pandas","Get the Top N Rows per Group in pandas","List the three best-selling products in each region, the largest invoice per customer, or the top five reps per quarter. Use sort_values with groupby().head(), decide what happens to ties with rank, rank aggregated totals rather than raw rows, and fold everything else into an \"Other\" line.",[163,11,63],{"path":236,"title":237,"description":238,"type":23,"topics":239,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fpivot-text-values-instead-of-numbers-in-pandas","Pivot Text Values Instead of Numbers in pandas","Turn a long list of statuses, shift codes or comments into a grid — projects by week, employees by day — when the values are text, not numbers: pivot for unique combinations, the \"duplicate entries\" error and how to resolve it, pivot_table with first, last or joined values, picking the latest status by timestamp, and colouring the grid by value in Excel.",[163,11],{"path":241,"title":242,"description":243,"type":23,"topics":244,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Frun-a-pareto-analysis-on-excel-data-with-pandas","Run a Pareto Analysis on Excel Data with pandas","Find the handful of customers or products that make up 80% of revenue. Aggregate, sort, compute cumulative shares, classify items into A, B and C with a clear rule for the item that crosses each threshold, and write the table with a native Excel Pareto chart — columns plus a cumulative line on a secondary axis.",[163,245,11],"charts-and-images",{"path":247,"title":248,"description":249,"type":23,"topics":250,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fsort-pivot-rows-in-a-custom-order-with-pandas","Sort Pivot Rows in a Custom Order with pandas","Pivot tables sort labels alphabetically — Apr, Aug, Dec, Feb… and L, M, S, XL — which is never what a report wants. Impose a business order with ordered Categoricals or reindex, keep empty categories visible, push \"Other\" and totals to the end, sort by value within a fixed group order, and make sure the order survives the trip to Excel.",[163,11],{"path":252,"title":253,"description":254,"type":23,"topics":255,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Funpivot-a-wide-excel-sheet-with-pandas-melt","Unpivot a Wide Excel Sheet with pandas melt","Turn a month-per-column spreadsheet into tidy rows — pd.melt, choosing id_vars, parsing the column names into real dates, and handling multi-level headers.",[163,11],{"path":257,"title":258,"description":259,"type":23,"topics":260,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fcreating-pivot-tables-from-excel-data\u002Fuse-different-aggregations-per-column-in-a-pivot","Use Different Aggregations per Column in a pandas Pivot","Sum revenue, average price, count distinct customers and find the last order date in one summary table. Use pivot_table's aggfunc dictionary or groupby named aggregation, compute weighted averages correctly, add a total row that uses the same rules, and write readable column names to Excel.",[163,11],{"path":262,"title":263,"description":264,"type":17,"topics":265,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas","Excel Formula Equivalents in pandas","Translate SUMIF, COUNTIF, VLOOKUP, INDEX MATCH, nested IFs and text functions into pandas — with the mask-select-aggregate pattern behind all of them.",[63,11],{"path":267,"title":268,"description":269,"type":23,"topics":270,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fapproximate-match-vlookup-in-pandas","Approximate-Match VLOOKUP for Tiered Rates in pandas","Look up commission rates, discount bands or tax brackets the way VLOOKUP(value, table, 2, TRUE) does — the largest threshold not above the value. Use merge_asof, searchsorted or pd.cut, handle values below the first tier, keep the tier table sorted, use different tiers per region, and calculate progressive (marginal) amounts correctly.",[63,141,11],{"path":272,"title":273,"description":274,"type":23,"topics":275,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Faverageifs-maxifs-minifs-in-pandas","AVERAGEIFS, MAXIFS and MINIFS Equivalents in pandas","Translate Excel's AVERAGEIFS, MAXIFS and MINIFS to pandas — boolean masks for one-off results, groupby for tables, transform for per-row columns — and reproduce Excel's handling of blanks, text, wildcards, date ranges and the empty case where MAXIFS returns 0.",[63,163,11],{"path":277,"title":278,"description":279,"type":23,"topics":280,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fcorrel-and-linest-equivalents-in-python","CORREL and LINEST Equivalents in Python","Reproduce Excel's CORREL, PEARSON, RSQ and LINEST in pandas and NumPy: one correlation or a whole matrix, simple and multiple regression, the full five-row LINEST statistics block with standard errors, R², F and sums of squares, LINEST's reversed coefficient order, and a check against the spreadsheet's own result.",[63,11],{"path":282,"title":283,"description":284,"type":23,"topics":285,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fcountif-and-countifs-equivalent-in-pandas","COUNTIF and COUNTIFS Equivalent in pandas","Count matching rows by summing a boolean mask, count blanks and distinct values in one call, and replace a copied-down COUNTIF with groupby().transform('size').",[63,11],{"path":287,"title":288,"description":289,"type":23,"topics":290,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Feomonth-and-edate-equivalents-in-pandas","EOMONTH and EDATE Equivalents in pandas","Reproduce Excel's EDATE and EOMONTH in pandas for whole columns — month arithmetic that clamps 31 January to 28 February, month ends that do not depend on whether a date is already a month end, a different number of months per row, first-of-month dates and the time-of-day that Excel drops.",[63,85,11],{"path":292,"title":293,"description":294,"type":23,"topics":295,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fexcel-if-formulas-as-pandas-conditional-columns","Excel IF Formulas as pandas Conditional Columns","IF becomes np.where and nested IFs become np.select, with pd.cut for numeric bands. Includes the IFERROR translation and why apply is the slow way to do it.",[63,11],{"path":297,"title":298,"description":299,"type":23,"topics":300,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fexcel-text-function-equivalent-in-pandas","Excel TEXT Function Equivalent in pandas","Turn numbers and dates into formatted text — \"1,234.50\", \"12.3%\", \"00042\", \"Mar 2026\", \"(1,234.50)\" — for labels, file names and email bodies, the way Excel's TEXT does. Map TEXT format codes to Python format specs and strftime, and fix the rounding difference that makes \"1,234.5\" come out as \"1,234\" instead of \"1,235\".",[63,36,11],{"path":302,"title":303,"description":304,"type":23,"topics":305,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fexcel-text-functions-left-right-mid-and-concat-in-pandas","Excel Text Functions LEFT, RIGHT, MID and CONCAT in pandas","Slicing replaces LEFT, RIGHT and MID; + and str.cat replace CONCATENATE and TEXTJOIN. Plus split, extract and the regex work that has no formula equivalent.",[63,11],{"path":307,"title":308,"description":309,"type":23,"topics":310,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Ffind-search-and-substitute-equivalents-in-pandas","FIND, SEARCH and SUBSTITUTE Equivalents in pandas","Translate Excel's FIND, SEARCH, SUBSTITUTE and REPLACE to pandas string methods: positions that start at 0 instead of 1, -1 instead of #VALUE!, case-insensitive search, Excel wildcards, replacing only the second occurrence, and the MID(FIND()) pattern for text between delimiters.",[63,10,11],{"path":312,"title":313,"description":314,"type":23,"topics":315,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fforecast-trend-and-slope-equivalents-in-python","FORECAST, TREND, SLOPE and RSQ Equivalents in Python","Reproduce Excel's linear trend functions — SLOPE, INTERCEPT, RSQ, CORREL, STEYX, TREND and FORECAST.LINEAR — with NumPy, matching the spreadsheet to many decimal places. Fit a trend per product, use dates as the x-axis, project the next periods, and know where a straight line stops being a forecast.",[63,163,11],{"path":317,"title":318,"description":319,"type":23,"topics":320,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fiferror-and-isna-equivalents-in-pandas","IFERROR, IFNA, ISNA and ISNUMBER Equivalents in pandas","In pandas, a division by zero is inf, a failed lookup is NaN and bad text fails to_numeric — there are no error cells to catch. Translate IFERROR, IFNA, ISNA, ISBLANK, ISNUMBER and ISTEXT into the pandas operations that match each case, and keep IFERROR's habit of hiding real problems out of your pipeline.",[63,30,11],{"path":322,"title":323,"description":324,"type":23,"topics":325,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Findex-match-equivalent-in-pandas","INDEX MATCH Equivalent in pandas","INDEX\u002FMATCH becomes map for one column and merge for several. Handle composite keys without a helper column, report unmatched keys, and use merge_asof for banded lookups.",[63,141,11],{"path":327,"title":328,"description":329,"type":23,"topics":330,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fmatch-excel-rounding-in-pandas","Match Excel Rounding in pandas","pandas and Python round halves to the nearest even number, while Excel's ROUND rounds them away from zero — so 0.125 becomes 0.12 in pandas and 0.13 in Excel. Reproduce ROUND, ROUNDUP, ROUNDDOWN and MROUND exactly, and fix totals that differ by a penny.",[63,36,11],{"path":332,"title":333,"description":334,"type":23,"topics":335,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fmedian-mode-and-quartile-equivalents-in-pandas","MEDIAN, MODE and QUARTILE Equivalents in pandas","Match Excel's MEDIAN, MODE.SNGL, MODE.MULT, QUARTILE.INC, QUARTILE.EXC, PERCENTILE.INC and PERCENTILE.EXC in pandas: which quantile method equals which Excel function, why pandas' mode differs from MODE.SNGL when there is a tie, how Excel ignores text in ranges, per-group medians and quartiles, and a spreadsheet cross-check.",[63,11],{"path":337,"title":338,"description":339,"type":23,"topics":340,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fpmt-npv-and-irr-in-python","PMT, NPV, IRR and XIRR Excel Functions in Python","Reproduce Excel's financial functions in Python with numpy-financial: loan payments with PMT, FV, NPER and RATE, project values with NPV and IRR, and dated cash flows with XNPV and XIRR. Every result here matches the spreadsheet — including the NPV difference that catches almost everyone.",[63,11,341],"reliable-jobs",{"path":343,"title":344,"description":345,"type":23,"topics":346,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Frank-and-percentile-formulas-in-pandas","RANK and PERCENTILE Formulas in pandas","Match RANK.EQ with method='min' and ascending=False, rank within groups in one call, and replace LARGE, PERCENTILE and QUARTILE with nlargest, quantile and qcut.",[63,163,11],{"path":348,"title":349,"description":350,"type":23,"topics":351,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Freplace-excel-solver-with-python","Replace Excel Solver with Python","Move Solver models out of a dialog box and into a script: read the decision data from a workbook, solve linear programmes with scipy.optimize.linprog, whole-number problems with milp, report which constraints bind and what an extra unit of each resource is worth, and write the plan back to Excel.",[63,11],{"path":353,"title":354,"description":355,"type":23,"topics":356,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fround-roundup-mround-and-ceiling-equivalents-in-python","ROUND, ROUNDUP, MROUND and CEILING Equivalents in Python","Reproduce Excel's rounding functions exactly in Python and pandas: why round(2.5) gives 2 and pandas rounds halves to even while Excel's ROUND rounds them away from zero, how floating point turns 2.675 into 2.67, and correct equivalents for ROUND, ROUNDUP, ROUNDDOWN, MROUND, CEILING and FLOOR — including negative digits and negative numbers — checked against a recalculated workbook.",[63,11],{"path":358,"title":359,"description":360,"type":23,"topics":361,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Frunning-totals-and-year-over-year-growth-in-pandas","Running Totals and Year-Over-Year Growth in pandas","cumsum for running totals, shift and pct_change for period comparisons, rolling for moving averages — and why a year-over-year join beats shift when months go missing.",[63,163,11],{"path":363,"title":364,"description":365,"type":23,"topics":366,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fscan-reduce-and-map-equivalents-in-pandas","SCAN, REDUCE, MAP and BYROW Equivalents in pandas","Excel's LAMBDA helper functions — SCAN for running results, REDUCE for a single accumulated value, MAP for element-by-element calculations, BYROW and BYCOL for per-row and per-column results — translated to pandas and the Python standard library: when a vectorised cumsum, cumprod or clip does the job, when only an itertools.accumulate loop reproduces SCAN (a balance that cannot go below zero), and how to keep the logic testable.",[63,11],{"path":368,"title":369,"description":370,"type":23,"topics":371,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fstdev-and-var-equivalents-in-pandas","STDEV.S, STDEV.P, VAR.S and VAR.P in pandas and NumPy","pandas .std() and NumPy std() give different answers for the same numbers — one matches Excel's STDEV.S, the other STDEV.P. Match each Excel function exactly with ddof, choose between sample and population deliberately, handle single-value groups, and compute per-group spread, coefficients of variation and z-scores.",[63,163,11],{"path":373,"title":374,"description":375,"type":23,"topics":376,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fsumif-and-sumifs-equivalent-in-pandas","SUMIF and SUMIFS Equivalent in pandas","Translate conditional totals into pandas: boolean masks, several conditions joined with &, wildcards as string methods, and transform for a SUMIF copied down a column.",[63,11],{"path":378,"title":379,"description":380,"type":23,"topics":381,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fsumproduct-and-weighted-average-in-pandas","SUMPRODUCT and Weighted Averages in pandas","Translate Excel's SUMPRODUCT to pandas — total value from quantity times price, conditional sums with boolean arrays, and weighted averages such as average price weighted by units. Covers weighted averages per group, missing weights, and why the plain mean of averages gives the wrong answer.",[63,163,11],{"path":383,"title":384,"description":385,"type":23,"topics":386,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Ftextjoin-equivalent-in-pandas","TEXTJOIN Equivalent in pandas (Join Values per Group)","Combine many rows into one cell — every product a customer bought, \"North, South, East\" — the way Excel's TEXTJOIN does. Join per group with groupby and str.join, skip blanks like ignore_empty, convert numbers, de-duplicate and sort within each group, respect Excel's cell length limit, and split the result back into rows.",[63,163,11],{"path":388,"title":389,"description":390,"type":23,"topics":391,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Funique-sort-and-filter-equivalents-in-pandas","UNIQUE, SORT and FILTER Equivalents in pandas","Reproduce Excel's dynamic array functions in pandas: UNIQUE with drop_duplicates, \"values that appear exactly once\", SORT and SORTBY with sort_values, FILTER with boolean masks and an if_empty fallback, and the chained SORT(UNIQUE(FILTER())) pattern — plus the case-sensitive sort that puts \"Banana\" before \"apple\".",[63,11,10],{"path":393,"title":394,"description":395,"type":23,"topics":396,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fvstack-hstack-take-and-choosecols-equivalents-in-pandas","VSTACK, HSTACK, TAKE and CHOOSECOLS Equivalents in pandas","Translate Excel's array-shaping functions — VSTACK, HSTACK, TAKE, DROP, CHOOSECOLS, CHOOSEROWS, TOCOL and WRAPROWS — into pandas and NumPy, including the one difference that changes results: Excel stacks by position, pandas by column name and index. Each mapping is checked against the spreadsheet's own result.",[63,11],{"path":398,"title":399,"description":400,"type":23,"topics":401,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fexcel-formula-equivalents-in-pandas\u002Fxlookup-equivalent-in-pandas","XLOOKUP Equivalent in pandas","Reproduce every XLOOKUP argument in pandas — exact lookups with a default for missing keys, Excel's case-insensitive matching, first or last match, next smaller or next larger item, wildcards, and returning several columns at once — with a reusable xlookup function.",[63,141,11],{"path":403,"title":404,"description":405,"type":23,"topics":406,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fextracting-data-from-messy-excel-sheets\u002Ffind-the-header-row-in-an-excel-sheet-with-a-shifting-layout","Find the Header Row in an Excel Sheet with a Shifting Layout","Exports that start their table on row 3 one month and row 6 the next break skiprows. Scan for the row that holds your required labels, then read from there — with aliases and column offsets handled.",[407,147,11],"messy-sheets",{"path":409,"title":410,"description":411,"type":23,"topics":412,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fextracting-data-from-messy-excel-sheets\u002Fparse-records-that-span-multiple-rows-in-excel","Parse Records That Span Multiple Rows in Excel with pandas","Bank statements wrap long descriptions onto extra rows, and contact exports stack one field per row. Number each record from the row that starts it, join the continuation lines, pivot stacked fields into columns, and catch orphan lines and repeated fields instead of silently mixing records.",[407,10,11],{"path":414,"title":415,"description":416,"type":23,"topics":417,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fextracting-data-from-messy-excel-sheets\u002Fread-a-sheet-where-records-run-across-columns","Read an Excel Sheet Where Records Run Across Columns","Some sheets are laid out sideways: field names down column A and one record per column — supplier comparisons, product spec sheets, quotes side by side. Read them with header=None and index_col=0, transpose, fix the column types that transposing mixes up, handle several blocks on one sheet, and write the tidy table back.",[407,147,11],{"path":419,"title":420,"description":421,"type":23,"topics":422,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fextracting-data-from-messy-excel-sheets\u002Fread-excel-with-multi-row-headers-in-pandas","Read Excel with Multi-Row Headers in pandas","Load a sheet whose column headers span two rows — a merged quarter above Revenue and Units — into a MultiIndex, then select, flatten or reshape it into a tidy table.",[407,147,11],{"path":424,"title":425,"description":426,"type":23,"topics":427,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fextracting-data-from-messy-excel-sheets\u002Fremove-subtotal-and-total-rows-from-an-excel-export","Remove Subtotal and Total Rows from an Excel Export","Subtotal and grand-total rows double every sum you compute. Find them by label, by missing detail fields or by SUBTOTAL formulas, remove them, and use the totals to check your own numbers.",[407,10,11],{"path":429,"title":430,"description":431,"type":17,"topics":432,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fhandling-missing-data-in-excel-reports","Handling Missing Data in Excel Reports with Pandas","Handle missing data in Excel reports with pandas: map blanks to NaN, profile gaps, choose type-aware fills for numeric, categorical, and date columns, then validate and export.",[30,11],{"path":434,"title":435,"description":436,"type":23,"topics":437,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fhandling-missing-data-in-excel-reports\u002Fdrop-rows-with-missing-required-fields-in-pandas","Drop Rows with Missing Required Fields in pandas","dropna() with no arguments removes almost everything. Name the required columns, normalise blank-looking placeholders first, and keep the rejected rows with a reason and a source row number.",[30,11],{"path":439,"title":440,"description":441,"type":23,"topics":442,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fhandling-missing-data-in-excel-reports\u002Ffill-missing-values-in-excel-with-pandas-fillna","Fill Missing Values in Excel with Pandas fillna","Fill missing values in an Excel file with pandas fillna: normalize blanks to NaN, then apply a scalar, a per-column dictionary, forward\u002Fback fill, or interpolation, and export.",[30,11],{"path":444,"title":445,"description":446,"type":23,"topics":447,"kind":12},"\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.",[30,57,11],{"path":449,"title":450,"description":451,"type":23,"topics":452,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fhandling-missing-data-in-excel-reports\u002Fforward-fill-blank-cells-in-grouped-excel-reports","Forward-Fill Blank Cells in Grouped Excel Reports with pandas","Grouped Excel reports show each region or category once and leave the rows below it blank, often in merged cells. Fill those labels down with pandas without leaking a label into the next group, filling data columns by mistake, or carrying labels into total rows.",[30,407,11],{"path":454,"title":455,"description":456,"type":23,"topics":457,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fhandling-missing-data-in-excel-reports\u002Fimpute-missing-values-by-group-with-pandas","Impute Missing Values by Group with pandas","Fill gaps in Excel data with values that make sense for each row's group rather than one column-wide average: group means and medians with groupby transform, a fallback chain when a whole group is empty, minimum group sizes, flag columns that record what was filled, and a check that imputation did not distort the totals you report.",[30,11],{"path":459,"title":460,"description":461,"type":23,"topics":462,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fhandling-missing-data-in-excel-reports\u002Finterpolate-missing-numeric-values-in-excel-data","Interpolate Missing Numeric Values in Excel Data","Fill gaps in an ordered series without inventing nonsense — linear and time interpolation in pandas, limits and directions, group-wise fills, and flagging what was estimated.",[30,11],{"path":464,"title":465,"description":466,"type":23,"topics":467,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fhandling-missing-data-in-excel-reports\u002Freplace-placeholder-text-with-nan-in-pandas","Replace Placeholder Text with NaN in pandas","Excel sheets mark missing data with \"n\u002Fa\", \"-\", \"TBC\", -999 or 31\u002F12\u002F9999. Turn those placeholders into real missing values with read_excel's na_values, per-column rules and sentinel masks — without losing genuine values such as the country code NA.",[30,10,11],{"path":469,"title":470,"description":471,"type":23,"topics":472,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fhandling-missing-data-in-excel-reports\u002Ftell-blank-cells-empty-strings-and-zeros-apart-in-excel-data","Tell Blank Cells, Empty Strings and Zeros Apart in Excel Data","A cell that looks empty in Excel can be truly empty, a formula returning \"\", a typed space, a zero hidden by its number format, or a placeholder like N\u002FA — and pandas collapses most of them into NaN. See what read_excel and openpyxl actually return for each, classify every cell, and choose a policy before you count or fill blanks.",[30,147,11],{"path":474,"title":475,"description":476,"type":17,"topics":477,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes","Merging and Joining Excel DataFrames with Pandas","Merge and join Excel DataFrames with pandas: normalize keys, pick the right join type, join on multiple columns, resolve suffix collisions, validate cardinality, and fix dtype and duplicate-key bugs.",[141,11],{"path":479,"title":480,"description":481,"type":23,"topics":482,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Fconcatenate-excel-sheets-with-different-columns","Concatenate Excel Sheets with Different Columns","Stack monthly exports whose columns drift — align headers, map renamed fields, keep a source column, and report what each file was missing before you combine them.",[141,483,11],"sheets-and-files",{"path":485,"title":486,"description":487,"type":23,"topics":488,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Fcreate-every-combination-of-two-lists-with-a-cross-join","Create Every Combination of Two Lists with a Cross Join in pandas","Build every store × product, employee × training course or region × month combination with merge(how=\"cross\"), then left-join the actual data so missing combinations show as zero or \"not done\" instead of disappearing. Covers three or more lists, MultiIndex.from_product, filtering impossible pairs, guarding against size explosions, and writing a complete grid to Excel.",[141,11],{"path":490,"title":491,"description":492,"type":23,"topics":493,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Ffind-rows-in-one-excel-file-missing-from-another","Find Rows in One Excel File Missing from Another","Reconcile two spreadsheets in Python — an indicator merge for both directions, composite keys, near-matches from whitespace, and a formatted exceptions workbook.",[141,11],{"path":495,"title":496,"description":497,"type":23,"topics":498,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Ffuzzy-match-names-between-two-excel-files-with-python","Fuzzy Match Names Between Two Excel Files with Python","Join two spreadsheets when the names do not quite match — Acme Ltd vs ACME Limited — with rapidfuzz: normalise names, choose a scorer, set a cut-off, score every pair at once, and send doubtful matches for review.",[141,10,11],{"path":500,"title":501,"description":502,"type":23,"topics":503,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Fhandle-many-to-many-lookups-without-duplicating-rows","Handle Many-to-Many Lookups Without Duplicating Rows","When a lookup key matches several rows — a product in two promotions, a customer with several account managers — a pandas merge multiplies the left rows and every total built on them is inflated. Detect the fan-out, then choose deliberately: collapse the lookup to one row per key, pick one match by a rule, combine matches into a list, or allocate amounts across them so totals still reconcile.",[141,11],{"path":505,"title":506,"description":507,"type":23,"topics":508,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Fmatch-rows-by-nearest-date-with-merge-asof","Match Rows by Nearest Date with pandas merge_asof","Attach the exchange rate, price or status that applied at each transaction's date — the latest one on or before it — with pandas merge_asof. Match within groups such as currency, limit how stale a match may be, choose backward, forward or nearest, and fix the sorting and dtype errors it raises.",[141,85,11],{"path":510,"title":511,"description":512,"type":23,"topics":513,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Fmerge-excel-data-on-multiple-key-columns","Merge Excel Data on Multiple Key Columns with pandas","Match rows on region and product, or store and date, rather than on one ID. Merge on several columns at once, find why some rows do not match — a key typed as 7 in one file and \"007\" in another, a trailing space — guard against duplicate keys multiplying rows, and fall back to a less specific key when the exact combination is missing.",[141,11,10],{"path":515,"title":516,"description":517,"type":23,"topics":518,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Fmerge-excel-files-with-different-column-names","Merge Excel Files with Different Column Names in pandas","Two systems export the same customers under different headers — \"Customer No\" and \"cust_id\", \"Email\" and \"email_address\" — with keys formatted differently. Map both files to one schema, normalise the keys, merge on several columns and combine the overlapping fields with a clear rule for which source wins.",[141,483,11],{"path":520,"title":521,"description":522,"type":23,"topics":523,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Fmerge-two-excel-files-on-common-column-python","Merge Two Excel Files on a Common Column in Python","Merge two Excel files on a shared column in Python with pandas: load both workbooks, normalize the key, join with pd.merge, handle different names and duplicate keys, export.",[141,11],{"path":525,"title":526,"description":527,"type":23,"topics":528,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Fupdate-one-excel-file-from-another-with-pandas","Update One Excel File from Another with pandas","Apply a changes file to a master list — new prices, corrected emails, customers added — the way people do with copy-paste and VLOOKUP. Compare DataFrame.update, combine_first and an explicit upsert, keep a change log of old and new values, and write the updates into the existing workbook without destroying its formatting.",[141,229,11],{"path":530,"title":531,"description":532,"type":23,"topics":533,"kind":12},"\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.",[141,57,11],{"path":535,"title":536,"description":537,"type":23,"topics":538,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmerging-and-joining-excel-dataframes\u002Fvlookup-equivalent-in-pandas-for-excel-files","The VLOOKUP Equivalent in pandas for Excel Files","merge is the real answer, map is the fast one: translating a VLOOKUP into pandas, keeping the unmatched rows visible, handling duplicate lookup keys, and the approximate-match case VLOOKUP's fourth argument hides.",[63,141,11],{"path":540,"title":541,"description":542,"type":17,"topics":543,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmoving-data-between-excel-and-databases","Moving Data Between Excel and Databases","Excel as the interface, the database as the source of truth: query to workbook with SQLAlchemy, load a spreadsheet into a table safely, keep types intact in both directions, and refresh on a schedule.",[544,11],"data-sources",{"path":546,"title":547,"description":548,"type":23,"topics":549,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmoving-data-between-excel-and-databases\u002Fexport-sql-query-results-to-excel-with-python","Export SQL Query Results to Excel with Python","Run a parameterised query with SQLAlchemy and write the result to a formatted workbook: one sheet per result set, correct date and money formats, sized columns, and chunked reads for big results.",[544,229,11],{"path":551,"title":552,"description":553,"type":23,"topics":554,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmoving-data-between-excel-and-databases\u002Fload-an-excel-file-into-a-sql-database-with-pandas","Load an Excel File into a SQL Database with pandas","Take a spreadsheet people filled in and get it into a table safely: normalise the columns, pin the types, stage the rows, validate them, then merge in one transaction that either succeeds or leaves nothing behind.",[544,147,11],{"path":556,"title":557,"description":558,"type":23,"topics":559,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmoving-data-between-excel-and-databases\u002Fload-excel-into-sqlite-with-a-defined-schema","Load Excel into SQLite with a Defined Schema","Load Excel sheets into SQLite tables that you designed — proper types, primary keys, NOT NULL and CHECK constraints, foreign keys and STRICT typing — instead of whatever pandas.to_sql guesses: create the schema first, convert dates and decimals deliberately, insert in one transaction so a bad row rolls the whole load back, and report exactly which rows broke which rule.",[544,11],{"path":561,"title":562,"description":563,"type":23,"topics":564,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmoving-data-between-excel-and-databases\u002Fquery-a-database-for-ids-listed-in-an-excel-sheet","Query a Database for IDs Listed in an Excel Sheet","Someone sends a spreadsheet of customer or order IDs and wants the matching records. Clean the IDs, pass them to SQL safely as parameters, split long lists into chunks the database driver accepts, switch to a temporary table for very long lists, and report the IDs that were not found — in the order the sheet listed them.",[544,11],{"path":566,"title":567,"description":568,"type":23,"topics":569,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmoving-data-between-excel-and-databases\u002Fscrape-a-web-page-table-into-excel-with-pandas","Scrape a Web Page Table into Excel with pandas","Turn an HTML table on a web page into a clean Excel sheet. Fetch the page with requests, pick the right table out of several with read_html, flatten two-row headers, strip footnote markers and dashes so numbers become numbers, keep the links, and save the result with its source and time.",[544,11],{"path":571,"title":572,"description":573,"type":23,"topics":574,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fmoving-data-between-excel-and-databases\u002Fupsert-excel-rows-into-a-database-table","Upsert Excel Rows into a Database Table with Python","Load a maintained Excel sheet into a database table without duplicating rows — insert new keys, update changed ones and leave unchanged rows alone. Use a staging table and INSERT … ON CONFLICT, a to_sql method for smaller loads, and checks for duplicate keys and rows deleted from the sheet.",[544,11],{"path":576,"title":577,"description":578,"type":23,"topics":579,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Freading-excel-with-polars-and-arrow\u002Fconvert-pandas-excel-code-to-polars","Convert pandas Excel Code to Polars","Port an existing pandas Excel report script to Polars step by step: read_excel and to_excel equivalents, filtering, new columns, groupby and merge, pivot and fillna, the index that Polars does not have, NaN versus null, apply calls that become expressions, and a test that proves the new script produces the same workbook figures as the old one.",[580,11],"polars",{"path":582,"title":583,"description":584,"type":23,"topics":585,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Freading-excel-with-polars-and-arrow\u002Fspeed-up-pandas-excel-reads-with-the-calamine-engine","Speed Up pandas Excel Reads with the calamine Engine","Swap openpyxl for calamine in pandas.read_excel: install it, measure the difference, understand the trade-offs, and know which reads it will not help.",[586,147,580,11],"large-files",{"path":588,"title":589,"description":590,"type":23,"topics":591,"kind":12},"\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.",[57,11],{"path":593,"title":594,"description":595,"type":23,"topics":596,"kind":12},"\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.",[57,141,11],{"path":598,"title":599,"description":600,"type":23,"topics":601,"kind":12},"\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.",[141,57,11],{"path":603,"title":604,"description":605,"type":23,"topics":606,"kind":12},"\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.",[10,57,11],{"path":608,"title":609,"description":610,"type":23,"topics":611,"kind":12},"\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.",[57,11],{"path":613,"title":614,"description":615,"type":23,"topics":616,"kind":12},"\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.",[57,163,11],{"path":618,"title":619,"description":620,"type":23,"topics":621,"kind":12},"\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.",[57,11],{"path":623,"title":624,"description":625,"type":23,"topics":626,"kind":12},"\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.",[57,10,11],{"path":628,"title":629,"description":630,"type":23,"topics":631,"kind":12},"\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.",[57,147,11],{"path":633,"title":634,"description":635,"type":23,"topics":636,"kind":12},"\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.",[57,11],{"path":638,"title":639,"description":640,"type":23,"topics":641,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fcalculate-age-and-tenure-from-dates-with-pandas","Calculate Age and Tenure from Dates with pandas (DATEDIF Equivalent)","Compute completed years, months and days between two dates for a whole column — ages from birth dates, tenure from hire dates, contract length — matching Excel's DATEDIF. Covers why days divided by 365.25 is wrong on birthdays, 29 February, an as-of date, fractional years and tenure bands.",[85,63,11],{"path":643,"title":644,"description":645,"type":23,"topics":646,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fcalculate-business-days-between-excel-dates-with-pandas","Calculate Business Days Between Excel Dates with pandas","Reproduce NETWORKDAYS, NETWORKDAYS.INTL and WORKDAY in Python: count working days between two date columns with numpy busday_count, include both ends like Excel, exclude holidays from a sheet, and add working days to a date.",[85,11],{"path":648,"title":649,"description":650,"type":23,"topics":651,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fcalculate-the-nth-weekday-of-a-month","Calculate the Nth Weekday of a Month","Find dates like \"the second Tuesday\", \"the first Monday\" or \"the last Friday\" of every month with pandas: the WOM frequency in date_range, the WeekOfMonth and LastWeekOfMonth offsets, a plain function for a single date, the equivalent Excel formula written into a sheet and checked against Python, and what to do when the date lands on a public holiday.",[85,11],{"path":653,"title":654,"description":655,"type":23,"topics":656,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fcalculate-working-hours-between-two-timestamps","Calculate Working Hours Between Two Timestamps","Measure support tickets, approvals and orders against service levels in business hours: count only the time between opening and closing on working days, skip weekends and holidays, handle requests raised overnight, check a vectorised version against a simple one, flag SLA breaches and write the results to Excel.",[85,11],{"path":658,"title":659,"description":660,"type":23,"topics":661,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fconvert-excel-time-values-and-durations","Convert Excel Time Values and Durations in Python","Excel stores times and durations as fractions of a day, and pandas returns them as time objects, timedeltas or 1900 dates depending on the cell format. Turn them all into timedeltas, handle shifts that cross midnight, parse durations typed as text and write durations back so Excel shows hours, not \"1\".",[85,36,11],{"path":663,"title":664,"description":665,"type":23,"topics":666,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fconvert-text-dates-like-20240131-with-pandas","Convert Dates Like 20240131, 31.01.24 and 2024031 with pandas","ERP and mainframe exports write dates as 20240131, 31.01.24, 31-Jan-24 or day-of-year codes, and read_excel returns them as integers or text. Convert each layout with an explicit format, handle placeholders like 00000000, invalid dates such as 20240231 and two-digit years, and report what did not convert.",[85,10,11],{"path":668,"title":669,"description":670,"type":23,"topics":671,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fconvert-unix-timestamps-to-excel-dates-with-pandas","Convert Unix Timestamps to Excel Dates with pandas","Exports from APIs, logs and databases give times as Unix timestamps — 1790920800, or 1790920800000 in milliseconds. Detect the unit from the magnitude, convert with pd.to_datetime(unit=..., utc=True), move to the reader's time zone and drop the zone so Excel accepts it, handle zeros and text, convert back, and use the equivalent Excel formula when the conversion must stay in the sheet.",[85,11],{"path":673,"title":674,"description":675,"type":23,"topics":676,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fexpand-date-ranges-into-one-row-per-day-with-pandas","Expand Date Ranges into One Row per Day with pandas","Turn rows with a start and an end date into one row per day — or per working day — to count how many people are away on each date, spread a contract's value across the months it covers, and summarise by month. With explode, a vectorised repeat for large sheets, business-day calendars and a check that nothing was lost.",[85,11],{"path":678,"title":679,"description":680,"type":23,"topics":681,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Ffill-missing-dates-in-a-time-series-with-pandas","Fill Missing Dates in a Time Series from Excel with pandas","Daily exports only have rows for days when something happened, so charts skip the quiet days and averages come out too high. Add the missing dates with reindex and date_range, fill counts with zero and balances with the last known value, do it per store, and aggregate duplicate dates first.",[85,30,11],{"path":683,"title":684,"description":685,"type":23,"topics":686,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Ffind-overlapping-date-ranges-with-pandas","Find Overlapping Date Ranges with pandas","Catch double bookings, overlapping contracts and clashing leave requests in a sheet of start and end dates: the overlap test, checking each record against the previous one per group, listing every overlapping pair, merging overlaps into continuous periods, finding gaps, and highlighting the clashes in Excel.",[85,11],{"path":688,"title":689,"description":690,"type":23,"topics":691,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Ffix-excel-serial-numbers-showing-instead-of-dates","Fix Excel Serial Numbers Showing Instead of Dates","Your Excel file shows 45292 where a date should be. Fix it in Python with openpyxl number formats, pandas ExcelWriter date formats, and a repair pass for existing workbooks.",[85,692,11],"troubleshooting",{"path":694,"title":695,"description":696,"type":23,"topics":697,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fgroup-excel-data-by-fiscal-year-and-iso-week","Group Excel Data by Fiscal Year and ISO Week with pandas","Assign every Excel row to a fiscal year, fiscal period and ISO week with pandas — any fiscal start month, labels such as FY2026\u002F27, period numbers 1–12, ISO years that differ from calendar years around New Year, Excel's WEEKNUM rule, and complete weekly tables with no missing weeks.",[85,163,11],{"path":699,"title":700,"description":701,"type":23,"topics":702,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fgroup-excel-rows-by-month-and-quarter-with-pandas","Group Excel Rows by Month and Quarter with pandas","Aggregate Excel data into monthly and quarterly totals with pandas — Grouper vs to_period, filling empty periods, fiscal years, and writing the result back as a formatted report.",[85,163,11],{"path":704,"title":705,"description":706,"type":23,"topics":707,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fhandle-timezones-in-excel-timestamps-with-python","Handle Timezones in Excel Timestamps with Python","Excel cannot store a timezone. Convert aware datetimes to one zone, strip the offset for writing, label the sheet, and re-localise correctly when reading the file back.",[85,11],{"path":709,"title":710,"description":711,"type":23,"topics":712,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fparse-excel-dates-into-python-datetimes-with-pandas","Parse Excel Dates into Python datetimes with pandas","Turn messy Excel date columns into real datetime64 values with pandas — parse_dates on read, explicit formats, dayfirst ambiguity, coerce-and-report, and mixed-type columns.",[85,11],{"path":714,"title":715,"description":716,"type":23,"topics":717,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fresample-irregular-readings-to-regular-intervals","Resample Irregular Readings to Regular Intervals","Turn sensor, meter or price readings taken at irregular times into tidy hourly or daily values with pandas: resample means and their bias, time-weighted averages for values that hold until the next reading, consumption per interval from cumulative meter readings by interpolating at the boundaries, gaps left visible instead of invented, several devices at once, and an Excel report.",[85,11],{"path":719,"title":720,"description":721,"type":23,"topics":722,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-large-excel-files-in-python\u002Fread-large-excel-file-in-chunks-with-pandas","Read a Large Excel File in Chunks with pandas","pandas has no chunksize for Excel — build one with an openpyxl row generator, aggregate chunk by chunk, and keep peak memory flat on files with hundreds of thousands of rows.",[586,147,11],{"path":724,"title":725,"description":726,"type":23,"topics":727,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-large-excel-files-in-python\u002Freduce-memory-when-reading-excel-with-pandas","Reduce Memory When Reading Excel with pandas","Two different numbers decide whether a big Excel file fits in memory — the peak while the engine parses the workbook and the size of the DataFrame you keep. Measure both, then cut them with usecols, categorical and smaller numeric types, the right engine and, when even that is too much, streaming rows with openpyxl.",[586,147,11],{"path":729,"title":730,"description":731,"type":23,"topics":732,"kind":12},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-large-excel-files-in-python\u002Fwrite-large-dataframes-to-excel-with-write-only-mode","Write Large DataFrames to Excel with write_only Mode","Generate hundred-thousand-row workbooks without the memory — openpyxl write_only, xlsxwriter constant_memory, streaming a DataFrame row by row, and the formatting you must plan ahead.",[586,229,11],{"path":734,"title":735,"description":736,"type":23,"topics":737,"kind":12},"\u002Fautomating-reporting-workflows\u002Fautomating-excel-online-with-microsoft-graph\u002Fread-an-excel-file-from-sharepoint-or-onedrive-into-pandas","Read an Excel File from SharePoint or OneDrive into pandas","Download a workbook from a SharePoint library or a user's OneDrive with Microsoft Graph and read it straight into pandas from memory — resolving sites and drives, skipping unchanged files, and handling whole folders.",[738,739,147,11],"excel-online","publishing",{"path":741,"title":742,"description":743,"type":17,"topics":744,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports","Building Finance and Operations Reports in Excel with Python","The month-end pack, the aging report, the commission statement and the stock reorder list share one shape: exports in, reference data joined, a period chosen, numbers calculated, totals tied back to the source and exceptions surfaced first. This guide builds that shape once — a budget-versus-actual report from a ledger export — and shows how each finance and operations report reuses it.",[745,163,11],"report-layouts",{"path":747,"title":748,"description":749,"type":23,"topics":750,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-a-bank-reconciliation-report","Build a Bank Reconciliation Report with Python and Excel","Match a month of bank statement lines to the cash book: first on cheque numbers and invoice references, then on amount within a few days, one to one. List what is left — outstanding cheques, deposits in transit, bank charges and interest — flag old unmatched items, and prove the adjusted bank and book balances agree.",[745,141,11],{"path":752,"title":753,"description":754,"type":23,"topics":755,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-a-capacity-planning-report","Build a Capacity Planning Report","Compare the work in the order book with the hours each work centre can actually deliver, week by week, with pandas: turn orders into required hours through a routing table, calculate available capacity from shifts, efficiency, holidays and planned maintenance, show utilisation as a heatmap, find overloaded weeks, and test whether pulling work forward into spare weeks clears the backlog.",[745,11],{"path":757,"title":758,"description":759,"type":23,"topics":760,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-a-fleet-mileage-and-fuel-report","Build a Fleet Mileage and Fuel Report","Turn a fuel card export into a fleet report with pandas: distance driven from odometer readings at each fill-up, fuel economy per vehicle in litres per 100 km and miles per gallon, cost per kilometre, and the checks fleet managers rely on — odometers that go backwards, fills larger than the tank, the wrong fuel for the vehicle, and vehicles whose economy suddenly gets worse — written to a monthly Excel report.",[745,11],{"path":762,"title":763,"description":764,"type":23,"topics":765,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-a-production-yield-and-scrap-report","Build a Production Yield and Scrap Report","Turn production order records into a yield and scrap report with pandas: yield and first-pass yield per line, product and shift, scrap units and scrap cost at standard cost, a Pareto of scrap reasons showing the few that matter, weekly trends against a target, and checks that the recorded quantities add up — written to an Excel report for the production meeting.",[745,11],{"path":767,"title":768,"description":769,"type":23,"topics":770,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-a-sales-commission-report","Build a Sales Commission Report with Python and Excel","Calculate commissions from a month of closed deals: tiered rates applied the way the plan defines them — marginal like tax bands or on the whole amount once a tier is reached — clawbacks for cancelled deals, reps close to the next tier flagged, a summary for payroll and one statement sheet per rep showing the working.",[745,163,11],{"path":772,"title":773,"description":774,"type":23,"topics":775,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-a-sales-forecast-with-exponential-smoothing","Build a Sales Forecast with Exponential Smoothing","Forecast monthly sales from an Excel history with Holt-Winters exponential smoothing in Python: fit trend and seasonality with statsmodels, test the model on the months it did not see, compare it with a naive seasonal forecast, produce a twelve-month forecast with a range, and write the actuals, forecast and chart into a workbook the business can read.",[745,11],{"path":777,"title":778,"description":779,"type":23,"topics":780,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-a-warehouse-pick-list-from-orders","Build a Warehouse Pick List from Orders","Turn the day's open orders into printable pick lists with pandas: allocate each order line to stock in specific bins, oldest stock first, record shortages instead of over-allocating, combine identical items across orders into one batch pick, sort the picks in a snake path through the aisles so the picker never doubles back, and write one sheet per picker with tick boxes and a put-to-order table.",[745,11],{"path":782,"title":783,"description":784,"type":23,"topics":785,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-a-warranty-claims-report","Build a Warranty Claims Report","Analyse warranty claims with pandas the way quality and finance teams need: claims per thousand units sold by product and by month of sale, how long after sale products fail, the failure modes that cost most, a production batch that fails more often than the rest, and an estimate of the claims still to come on units under warranty to support the warranty provision — written to an Excel report.",[745,11],{"path":787,"title":788,"description":789,"type":23,"topics":790,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-a-work-in-progress-report-for-unbilled-time","Build a Work in Progress Report for Unbilled Time","Value the time a professional services firm has worked but not yet billed with pandas: price timesheet hours at each person's rate, subtract what has been invoiced, cap fixed-fee projects at their remaining fee, age the unbilled value by when the work was done, flag old WIP and projects over budget, and write the month-end WIP report that finance and project managers use to decide what to bill.",[745,11],{"path":792,"title":793,"description":794,"type":23,"topics":795,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-an-accounts-receivable-aging-report","Build an Accounts Receivable Aging Report with Python","Turn an open-invoice export into the aging report credit control works from: balances bucketed into current, 1–30, 31–60, 61–90 and over 90 days past due as at the period end, one row per customer with totals, credit notes netted, customers over their credit limit flagged and the total tied back to the ledger.",[745,163,11],{"path":797,"title":798,"description":799,"type":23,"topics":800,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-an-energy-consumption-report-from-meter-readings","Build an Energy Consumption Report from Meter Readings","Turn irregular meter readings typed into a spreadsheet into monthly energy use per site with pandas: convert cumulative readings into consumption, handle a meter that was replaced and one that rolled over, spread each reading interval across calendar months by days, flag suspicious jumps, add cost from tariffs and emissions from a conversion factor, and write a site-by-month report to Excel.",[745,11],{"path":802,"title":803,"description":804,"type":23,"topics":805,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-an-inventory-reorder-report","Build an Inventory Reorder Report with Python and Excel","Decide what to order this week from a stock export and recent sales: average daily usage, reorder points from lead time and safety stock, stock already on order counted, order quantities rounded up to pack sizes and minimums, days of cover, stock-out risks flagged and a purchase list grouped by supplier.",[745,163,11],{"path":807,"title":808,"description":809,"type":23,"topics":810,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-an-overtime-report-from-shift-data","Build an Overtime Report from Shift Data","Calculate overtime from clock-in and clock-out records with pandas: shifts that cross midnight, unpaid breaks, hours rounded to the quarter hour, overtime above contracted weekly hours, premium rates for Sundays and bank holidays, overtime cost by department, and a check of average weekly hours against a 48-hour limit — written to an Excel report for payroll and managers.",[745,11],{"path":812,"title":813,"description":814,"type":23,"topics":815,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fcalculate-fifo-inventory-valuation-with-python","Calculate FIFO Inventory Valuation with Python","Value stock and cost of goods sold first in, first out from purchase and sales ledgers: consume the oldest cost layers per SKU with a deque, cost each sale across several layers, value the layers left at the period end, stop on sales that exceed stock, compare with weighted average cost, and write the results to Excel with a reconciliation.",[745,11],{"path":817,"title":818,"description":819,"type":23,"topics":820,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fcheck-supplier-invoices-against-contract-prices","Check Supplier Invoices Against Contract Prices","Check every supplier invoice line before payment with pandas: look up the contract price in force on the invoice date, allow a small tolerance, compare the quantity invoiced with the quantity received, check the line arithmetic and the invoice total, value every overcharge, and produce a list of invoices to hold with the reason and the amount to query — written to Excel for the accounts payable team.",[745,11],{"path":822,"title":823,"description":824,"type":23,"topics":825,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fconsolidate-timesheets-from-many-workbooks","Consolidate Timesheets from Many Workbooks with Python","Everyone fills in the same timesheet template and sends it back; you need hours by project and person for the week. Read the name and week from each file's header cells, unpivot the day grid into rows, spot who has not submitted, catch unknown project codes, impossible days and short weeks, and write one consolidated workbook.",[483,745,11],{"path":827,"title":828,"description":829,"type":23,"topics":830,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fmodel-the-impact-of-a-price-increase","Model the Impact of a Price Increase","Estimate what a price increase will do to revenue and gross profit with pandas before announcing it: apply candidate increases per product group, model lost volume with simple elasticity assumptions, respect customer contracts that fix prices until a date, calculate the break-even volume loss for each product, compare scenarios side by side and write an Excel workbook whose assumptions sales and finance can change.",[745,11],{"path":832,"title":833,"description":834,"type":23,"topics":835,"kind":12},"\u002Fautomating-reporting-workflows\u002Fbuilding-multi-sheet-excel-dashboards\u002Fwrite-multiple-dataframes-to-one-excel-file","Write Multiple DataFrames to One Excel File","Write several pandas DataFrames into one .xlsx: separate sheets via one ExcelWriter, stacking on a single sheet with startrow, and appending with mode='a'.",[229,483,11],{"path":837,"title":838,"description":839,"type":23,"topics":840,"kind":12},"\u002Fautomating-reporting-workflows\u002Fpublishing-excel-reports-to-cloud-storage\u002Fread-an-excel-file-directly-from-amazon-s3-with-pandas","Read an Excel File Directly from Amazon S3 with pandas","Load a workbook from S3 into a DataFrame without a temporary file: BytesIO reads, paginated prefix scans, readable error translation, and a Parquet cache for repeat runs.",[544,739,147,11],{"path":842,"title":843,"description":844,"type":23,"topics":845,"kind":12},"\u002Fautomating-reporting-workflows\u002Ftesting-and-packaging-excel-automation-scripts\u002Fgenerate-realistic-test-data-for-excel-reports-with-faker","Generate Realistic Test Data for Excel Reports with Faker","Build believable, reproducible test workbooks for Excel report code with Faker and pandas: seeded generators, locale-specific names and addresses, a custom provider for your own codes, related sheets with valid foreign keys, deliberate messiness such as blanks, stray spaces and text dates, unique values, and a pytest fixture that writes the file.",[341,11],{"path":847,"title":848,"description":849,"type":23,"topics":850,"kind":12},"\u002Fautomating-reporting-workflows\u002Ftesting-and-packaging-excel-automation-scripts\u002Ftest-excel-code-against-several-library-versions-with-nox","Test Excel Code Against Several Library Versions with nox","Find out before your users do whether your Excel automation still works with the next pandas or openpyxl release, and still works with the oldest versions you claim to support: a nox session matrix over Python and pandas versions, uv for fast environments, warnings turned into errors, and a lowest-versions session that checks the minimums in pyproject.toml.",[341,11],{"path":852,"title":853,"description":854,"type":23,"topics":855,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fread-an-excel-table-by-name-into-pandas","Read an Excel Table by Name into pandas","pandas has no option to read an Excel table by its name, but openpyxl knows every table's exact range. Find a table anywhere in the workbook, skip its totals row, get formula results, and load it into a DataFrame.",[856,147,857,11],"tables-and-filters","openpyxl",{"path":859,"title":860,"description":861,"type":23,"topics":862,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fsort-excel-rows-with-python-before-writing","Sort Excel Rows with Python Before Writing","openpyxl cannot sort a worksheet — order the data in pandas first. Multi-key sorts, custom category orders, natural sorting of codes, stable ties and where blanks end up.",[856,11],{"path":864,"title":865,"description":866,"type":23,"topics":867,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fautomating-excel-with-xlwings-basics\u002Fcontrol-how-xlwings-converts-dataframes-and-ranges","Control How xlwings Converts DataFrames and Ranges","Get the Python values you expect from xlwings: why a range comes back as a scalar, a list or a list of lists, and how ndim, numbers, dates, empty, transpose and expand change that; how the DataFrame converter treats headers and the index on read and write; dictionaries from two-column ranges; and writing a custom converter for your own conventions, with its logic tested without Excel.",[868,11],"xlwings",{"path":870,"title":871,"description":872,"type":23,"topics":873,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fchoosing-a-python-excel-library\u002Fopenpyxl-vs-pandas-for-excel-automation","openpyxl vs pandas for Excel Automation","pandas reads Excel through openpyxl, so they are not rivals. See where the line falls — rows versus cells — and how to hand off between them in one script.",[874,857,11],"choosing-libraries",{"path":876,"title":877,"description":878,"type":879,"topics":880,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fchoosing-a-python-excel-library\u002Fpandas-vs-duckdb-for-excel-data","pandas vs DuckDB for Excel Data","When to query Excel data with DuckDB's SQL instead of pandas: reading .xlsx files with read_xlsx, speed on a large workbook, SQL against DataFrames already in memory, joins and window functions, the types DuckDB infers from Excel, a glob that silently reads one file, and writing results back to Excel.","comparison",[874,11],{"path":882,"title":883,"description":884,"type":23,"topics":885,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fchoosing-a-python-excel-library\u002Fpandas-vs-polars-for-excel-workflows","pandas vs Polars for Excel Workflows","Both read Excel through calamine and write through xlsxwriter, so the real difference is the transform. Compare the APIs, the speed, and how to move between them.",[874,580,11],{"path":887,"title":888,"description":889,"type":23,"topics":890,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fhandling-excel-file-formats-and-conversions\u002Fconvert-an-excel-sheet-to-a-latex-table","Convert an Excel Sheet to a LaTeX Table with Python","Turn a range from a workbook into a LaTeX table that compiles first time: read it with pandas, write it with to_latex or the Styler, escape the characters that break LaTeX (& % _ $ #), format numbers and percentages without letting a bare % comment out the row, add booktabs rules, a caption and a label, split long tables across pages, and check the result with pdflatex.",[74,11],{"path":892,"title":893,"description":894,"type":23,"topics":895,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fhandling-excel-file-formats-and-conversions\u002Fconvert-an-excel-sheet-to-a-markdown-table","Convert an Excel Sheet to a Markdown Table with Python","Turn a worksheet into a Markdown table for a README, a wiki page, a pull request or a chat message. Use DataFrame.to_markdown, then fix what it gets wrong — unescaped pipes, line breaks inside cells, \"nan\" for blanks and raw float formatting — and convert every sheet of a workbook into one document.",[74,11,739],{"path":897,"title":898,"description":899,"type":23,"topics":900,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fhandling-excel-file-formats-and-conversions\u002Fconvert-an-excel-sheet-to-an-html-table","Convert an Excel Sheet to an HTML Table with Python","Turn a worksheet into clean HTML for a web page, an email or an intranet report — pandas to_html, number and date formatting, Styler for highlights, captions and accessible headers, and several sheets on one page.",[74,11],{"path":902,"title":903,"description":904,"type":23,"topics":905,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fhandling-excel-file-formats-and-conversions\u002Fconvert-csv-files-to-excel-with-python","Convert CSV Files to Excel with Python","Turn CSV exports into proper Excel workbooks — detect the encoding and delimiter, keep IDs as text, parse dates, combine many CSVs into one workbook with a sheet each, split files larger than Excel's row limit, and format the result.",[74,229,11],{"path":907,"title":908,"description":909,"type":23,"topics":910,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fhandling-excel-file-formats-and-conversions\u002Fconvert-xml-to-excel-with-pandas","Convert XML to Excel with pandas read_xml","Turn an XML export — orders, invoices, a feed from a legacy system — into a workbook with one sheet per record type. Use pd.read_xml with XPath and namespaces, keep nested line items linked to their parent record, preserve codes with leading zeros, and stream very large files with iterparse.",[74,544,11],{"path":912,"title":913,"description":914,"type":23,"topics":915,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fhandling-excel-file-formats-and-conversions\u002Fread-xls-files-in-python-with-xlrd-and-pandas","Read .xls Files in Python with xlrd and pandas","Open legacy .xls workbooks from Python: install xlrd 2.x, read sheets into DataFrames, decode the date serials xlrd returns, and handle the 65,536-row ceiling.",[74,147,11],{"path":917,"title":918,"description":919,"type":23,"topics":920,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fhandling-excel-file-formats-and-conversions\u002Fread-xlsb-files-in-python","Read Binary .xlsb Excel Files in Python","Read Excel Binary Workbooks (.xlsb) with pandas — the pyxlsb and calamine engines, why dates arrive as numbers with pyxlsb, how error cells look, reading sheet by sheet with pyxlsb directly, and converting .xlsb to .xlsx.",[74,147,11],{"path":922,"title":923,"description":924,"type":17,"topics":925,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas","Reading Excel Files with Pandas","Load Excel workbooks into pandas DataFrames: pick the engine, target sheets and columns, control dtypes, and read multi-sheet files — with runnable examples.",[147,11],{"path":927,"title":928,"description":929,"type":23,"topics":930,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fhandle-merged-cells-when-reading-excel-with-pandas","Handle Merged Cells When Reading Excel with pandas","Merged cells read as one value and a run of blanks. Fix them in pandas with forward fill, detect merges with openpyxl, and unmerge a workbook before importing it.",[407,147,11],{"path":932,"title":933,"description":934,"type":23,"topics":935,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fhow-to-read-excel-with-pandas-step-by-step","How to Read Excel Files With Pandas: A Step-by-Step Guide","A copy-paste-runnable walkthrough for reading Excel files with pandas — from a one-line read to sheet and column targeting, header realignment, dtype control, and a defensive reader.",[147,11],{"path":937,"title":938,"description":939,"type":23,"topics":940,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fkeep-leading-zeros-when-reading-excel-with-pandas","Keep Leading Zeros When Reading Excel with pandas","Customer IDs, ZIP codes and phone numbers lose their leading zeros in read_excel. Fix it for text cells with dtype, and for numbers that only look padded because of a 00000 format, by reading the format with openpyxl.",[147,10,11],{"path":942,"title":943,"description":944,"type":23,"topics":945,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fread-a-cell-range-into-a-pandas-dataframe","Read a Cell Range Like B3:F20 into a pandas DataFrame","Pull exactly one block of cells out of a worksheet — a table that starts at B3 and ends at F20, with other content around it. Do it with read_excel's usecols, skiprows and nrows, or with openpyxl and an A1 range string, and turn it into one reusable function.",[147,857,11],{"path":947,"title":948,"description":949,"type":23,"topics":950,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fread-boolean-columns-from-excel-with-pandas","Read Yes\u002FNo and TRUE\u002FFALSE Columns as Booleans with pandas","Excel sheets store flags as TRUE\u002FFALSE cells, \"Yes\"\u002F\"No\" text, Y\u002FN codes, 1\u002F0 or a tick mark. See what read_excel does with each, why true_values quietly skips columns with blanks or odd spellings, and how to convert every flag column into a reliable nullable boolean.",[147,10,11],{"path":952,"title":953,"description":954,"type":23,"topics":955,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fread-excel-sheets-whose-names-change-with-pandas","Read Excel Sheets Whose Names Change with pandas","Find the right sheet when its name changes every month, differs in case or spacing, moves position or hides behind a hidden tab — by pattern, by date in the name, by visibility or by the columns it contains.",[147,483,11],{"path":957,"title":958,"description":959,"type":23,"topics":960,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fread-only-some-rows-of-an-excel-file-with-pandas","Read Only Some Rows of an Excel File with pandas","Read the first rows, a window in the middle, every nth row or the last rows of an Excel sheet with pandas — nrows, skiprows, skipfooter, and which of them actually saves time.",[147,11],{"path":962,"title":963,"description":964,"type":23,"topics":965,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fread-specific-columns-from-excel-with-pandas","Read Specific Columns From Excel With Pandas","Use read_excel usecols to load only the columns you need by name, index, Excel-letter range, or callable — combine it with sheet_name and dtype to save memory.",[147,11],{"path":967,"title":968,"description":969,"type":23,"topics":970,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fskip-rows-and-set-header-when-reading-excel-with-pandas","Skip Rows and Set the Header When Reading Excel with pandas","Read Excel files with title blocks, banners and multi-row headers using pandas — skiprows, header, nrows, usecols, and finding the header row automatically when it moves.",[147,11],{"path":972,"title":973,"description":974,"type":23,"topics":975,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fuse-converters-when-reading-excel-with-pandas","Use Converters When Reading Excel with pandas","Clean values as they are read — account codes with leading zeros, currency text, Y\u002FN flags and mixed date cells — with read_excel converters, and know how they interact with dtype and empty cells.",[147,10,11],{"path":977,"title":978,"description":979,"type":23,"topics":980,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Freading-excel-files-with-pandas\u002Fuse-nullable-dtypes-when-reading-excel-with-pandas","Use Nullable Data Types When Reading Excel with pandas","Stop blank cells turning whole integer and TRUE\u002FFALSE columns into floats: read Excel with dtype_backend=\"numpy_nullable\" or \"pyarrow\", set Int64 and boolean per column, see why convert_dtypes after the read is too late for booleans, and write the NA values back as empty cells.",[147,11,30],{"path":982,"title":983,"description":984,"type":23,"topics":985,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-excel-does-not-support-timezones-in-datetimes","Fix \"Excel does not support datetimes with timezones\" in pandas","Excel cells cannot store a time zone, so pandas refuses to write timezone-aware timestamps. Decide which clock the reader needs, convert to it, drop the zone, and label the column — for columns, indexes and object columns alike.",[692,85,11],{"path":987,"title":988,"description":989,"type":23,"topics":990,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-excel-file-format-cannot-be-determined-in-pandas","Fix \"Excel File Format Cannot Be Determined\" in pandas","Why pandas cannot pick an engine for your spreadsheet, how to name the engine explicitly, and how to handle streams, URLs and files with no extension at all.",[692,74,11],{"path":992,"title":993,"description":994,"type":23,"topics":995,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-excelwriter-has-no-attribute-save","Fix \"ExcelWriter object has no attribute save\" in pandas","pandas 2.0 removed ExcelWriter.save(), so old scripts fail with AttributeError. Replace it with a with block or close(), and fix the other removed writer APIs that usually break at the same time — book assignment, sheets assignment and handles.",[692,229,11],{"path":997,"title":998,"description":999,"type":23,"topics":1000,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-floating-point-noise-in-excel-output","Fix Floating-Point Noise Like 0.1 + 0.2 ≠ 0.3 in Excel Output","Sums such as 0.1 + 0.2 print as 0.30000000000000004, prices turn into 1998 cents instead of 1999, and threshold checks fail by a hair. See where binary floating point leaks into Excel reports, what the xlsx writers already hide, and how to round, compare and convert money safely.",[692,10,11],{"path":1002,"title":1003,"description":1004,"type":23,"topics":1005,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-missing-optional-dependency-openpyxl","Fix \"Missing optional dependency 'openpyxl'\" in pandas","pandas reads and writes Excel through separate engine packages, and the error means the engine is not importable from the Python that runs your code. Find which interpreter is running, install into that one, and handle the version-too-old variant.",[692,147,11],{"path":1007,"title":1008,"description":1009,"type":23,"topics":1010,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-pandas-futurewarnings-in-excel-pipelines","Fix pandas FutureWarnings in Excel Pipelines","Clear the FutureWarnings an Excel reporting script prints under pandas 2.x before they turn into errors in pandas 3: month-end and hourly frequency aliases, fillna(method=), applymap, positional Series indexing, chained assignment and inplace on a column — plus the silent pandas 3 change to text columns that breaks dtype == object checks — with each warning reproduced under both versions and fixed.",[692,11],{"path":1012,"title":1013,"description":1014,"type":23,"topics":1015,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-this-sheet-is-too-large-error","Fix \"This sheet is too large\" When Writing Excel with pandas","pandas raises \"This sheet is too large! Your sheet size is … Max sheet size is 1048576, 16384\" when a DataFrame exceeds Excel's grid. Split rows across sheets, transpose or split wide frames, summarise, or choose another format — and avoid the off-by-one that silently drops a row.",[692,586,11],{"path":1017,"title":1018,"description":1019,"type":23,"topics":1020,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-unnamed-0-columns-when-reading-excel","Fix \"Unnamed: 0\" Columns When Reading Excel with pandas","Columns called \"Unnamed: 0\", \"Unnamed: 3\" or \"Unnamed: 0_level_1\" appear when a header cell is empty. Find which of the four causes produced them and apply the matching fix — index_col, usecols, header rows or a cleanup step.",[692,147,11],{"path":1022,"title":1023,"description":1024,"type":23,"topics":1025,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Fclean-data-with-pandas-in-python-in-excel","Clean Data with pandas in Python in Excel","Use pandas inside Excel's =PY() cells to clean a messy table — trim text, fix types, drop duplicates, standardise categories — and return the cleaned table to the grid, with the calculation-order and output-mode rules that make it work.",[1026,10,11],"python-in-excel",{"path":1028,"title":1029,"description":1030,"type":23,"topics":1031,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-python-in-excel\u002Freturn-dataframes-and-values-from-python-in-excel-cells","Return DataFrames and Values from Python in Excel Cells","A =PY cell returns its last expression, either as a Python object card or spilled into the grid as Excel values. Shape DataFrames for the grid, avoid #SPILL!, and chain cells without recomputing.",[1026,11],{"path":1033,"title":1034,"description":1035,"type":17,"topics":1036,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fworking-with-multiple-excel-sheets-in-python","Working with Multiple Excel Sheets in Python","Read, transform, and write multi-sheet Excel workbooks with pandas and openpyxl — load all tabs into a dict, merge across sheets, and export to named sheets.",[483,11,857],{"path":1038,"title":1039,"description":1040,"type":23,"topics":1041,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fworking-with-multiple-excel-sheets-in-python\u002Fcreate-a-sheet-for-each-group-in-a-dataframe","Create a Sheet for Each Group in a DataFrame","Split one DataFrame into one worksheet per region, customer or month with groupby and ExcelWriter — with safe sheet names, a contents sheet, consistent formatting, and the silent overwrite trap when two groups map to the same name.",[483,229,11],{"path":1043,"title":1044,"description":1045,"type":23,"topics":1046,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fworking-with-multiple-excel-sheets-in-python\u002Fread-all-sheets-from-an-excel-file-into-dataframes","Read All Sheets from an Excel File into DataFrames","sheet_name=None returns a dictionary of every sheet — how to use it, why one ExcelFile beats repeated read_excel calls, how to filter and concatenate sheets, and what it costs on a large workbook.",[483,147,11],{"path":1048,"title":1049,"description":1050,"type":17,"topics":1051,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas","Writing DataFrames to Excel with Pandas","Export pandas DataFrames to Excel: single and multi-sheet workbooks, number and date formats, appending to existing files, and choosing the right engine.",[229,11],{"path":1053,"title":1054,"description":1055,"type":23,"topics":1056,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fappend-a-dataframe-to-an-existing-excel-file-with-pandas","Append a DataFrame to an Existing Excel File with pandas","Add rows or a new sheet to a workbook that already exists — ExcelWriter mode 'a', if_sheet_exists options, appending below existing data, and the openpyxl-only limits.",[229,11],{"path":1058,"title":1059,"description":1060,"type":23,"topics":1061,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fauto-fit-column-widths-when-writing-with-pandas","Auto-Fit Column Widths When Writing with pandas","Stop Excel reports opening with ##### and truncated headers — measure content width in Python and set column widths with xlsxwriter or openpyxl, including a reusable helper.",[1062,229,11],"cell-styling",{"path":1064,"title":1065,"description":1066,"type":23,"topics":1067,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fcontrol-how-nan-and-infinity-appear-in-excel-output","Control How NaN, None and Infinity Appear in Excel Output","pandas writes NaN, None, pd.NA and NaT as empty cells and infinity as the text \"inf\". Learn what each choice does to Excel formulas, when na_rep and inf_rep help or hurt, and how to handle division-by-zero results and placeholders column by column.",[229,30,11],{"path":1069,"title":1070,"description":1071,"type":23,"topics":1072,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fexport-a-styled-pandas-dataframe-to-excel","Export a Styled pandas DataFrame to Excel","Use pandas Styler to colour, bold and highlight a DataFrame, then write it to Excel with the styles intact — and learn which Styler features survive the trip, including why format() does not and what to use instead.",[1062,229,11],{"path":1074,"title":1075,"description":1076,"type":23,"topics":1077,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fhow-pandas-data-types-are-written-to-excel-cells","How pandas Data Types Are Written to Excel Cells","What to_excel actually stores for each pandas dtype — integers, nullable types, floats, booleans, text, datetime64, date objects, timedeltas, categoricals, Decimal, infinity, Period, lists and timezone-aware timestamps — checked cell by cell with openpyxl, plus the conversions to apply before writing so the workbook holds what you meant.",[229,11],{"path":1079,"title":1080,"description":1081,"type":23,"topics":1082,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fopenpyxl-vs-xlsxwriter-vs-pandas-excelwriter","openpyxl vs xlsxwriter vs pandas.ExcelWriter","Understand how pandas.ExcelWriter wraps the openpyxl and xlsxwriter engines, when each one wins, and write the same DataFrame three ways with a clear decision table.",[874,229,1083,857,11],"xlsxwriter",{"path":1085,"title":1086,"description":1087,"type":23,"topics":1088,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fround-numbers-for-excel-output-float-format-vs-number-formats","Round Numbers for Excel Output: float_format vs Number Formats","pandas offers three ways to get two decimal places into Excel — to_excel's float_format, DataFrame.round and a cell number format — and they do different things. See which one changes the stored value, which one changes only the display, and why they disagree on halves like 0.015.",[229,36,11],{"path":1090,"title":1091,"description":1092,"type":23,"topics":1093,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fwrite-a-dataframe-to-a-specific-cell-in-excel","Write a DataFrame to a Specific Cell in Excel with pandas","Place a DataFrame at B5 instead of A1 — with startrow and startcol, into a new file or into an existing template without wiping its title, formatting and notes — and know when to drop down to openpyxl.",[229,11],{"path":1095,"title":1096,"description":1097,"type":23,"topics":1098,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fwrite-a-multiindex-dataframe-to-excel","Write a MultiIndex DataFrame to Excel with pandas","Write pivot tables and grouped results with MultiIndex rows or columns to Excel — merged or repeated labels, the extra index-name row, the index=False error, flattening for filters, and reading it back.",[229,163,11],{"path":1100,"title":1101,"description":1102,"type":23,"topics":1103,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fwrite-clickable-links-from-a-dataframe-to-excel","Write Clickable Links from a DataFrame Column to Excel","Turn a column of URLs into clickable links when writing a DataFrame to Excel: rely on xlsxwriter's automatic URL detection, write HYPERLINK formulas with friendly text, or set cell.hyperlink with openpyxl. Covers link text, internal sheet links, URL length limits and formula injection.",[229,1062,11],{"path":1105,"title":1106,"description":1107,"type":23,"topics":1108,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fwrite-excel-formulas-from-a-pandas-dataframe","Write Excel Formulas from a pandas DataFrame","Put live formulas into a sheet written with to_excel: build formula strings per row, look up column letters by name so the formulas survive column changes, account for the header, index and startrow offsets, add a totals row, understand why the results read back as 0 or NaN until the file is recalculated, and turn the formula conversion off for text that merely starts with \"=\".",[229,1109,11],"excel-formulas",{"path":1111,"title":1112,"description":1113,"type":23,"topics":1114,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fwrite-pandas-dataframe-to-excel-without-index","Write a Pandas DataFrame to Excel Without the Index","Pass index=False to to_excel() to drop pandas row numbers from your spreadsheet — plus how it behaves with a MultiIndex, append mode, and a quick output check.",[229,11],1790972052271]