Small files. Visible problems.

Try a spreadsheet fix on invented records before touching your own export. Each set links to the guide that explains what to expect.

CSV and TSV files contain plain text. Spreadsheet applications may interpret dates and numbers differently. Keep the original download and follow the linked guide's import steps. Previews read text as UTF-8, so other encodings may show replacement characters. Downloads preserve the original bytes.

Check a separator or find your import problem.

Combine CSV files when columns are in a different order

Append CSV exports by header name with a small Python script that rejects duplicate headers, schema changes, and incomplete rows.

  • First export CSV
    Preview file text
    id,name,quantity
    001,"Blue, large",2
    002,White mug,4
    

    First 400 characters at most. Download the file for the complete example.

  • Reordered second export CSV
    Preview file text
    quantity,id,name
    3,003,Green mug
    1,004,"Red ""special"" mug"
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Convert CSV percentage strings to decimal fractions

For a field explicitly formatted as a percentage, remove the trailing percent sign and divide the numeric value by 100. Reject unmarked values unless their scale is documented separately.

  • Synthetic CSV sample CSV
    Preview file text
    rate
    12.5%
    0%
    100%
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Convert CSV to JSON records without guessing types

Validate the header and row widths, then turn each record into a JSON object. Keep CSV values as strings unless the receiving system gives you an explicit type for each field.

  • Synthetic CSV sample CSV
    Preview file text
    id,quantity,note
    0012,3,
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Convert day/month dates without guessing ambiguous rows

Resolve ambiguous imported dates with an explicit day/month rule, a validation formula, and a downloadable example with invalid-date cases.

  • Day/month sample and expected results CSV
    Preview file text
    raw_date,declared_order,expected
    03/04/2026,DMY,2026-04-03
    13/04/2026,DMY,2026-04-13
    29/02/2024,DMY,2024-02-29
    29/02/2026,DMY,REVIEW
    03/04/2026,unknown,REVIEW
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Count CSV records by category and reconcile the total

Count the category value once per record and keep blank categories as an explicit group. Verify that the category counts sum to the total number of data records.

  • Synthetic CSV sample CSV
    Preview file text
    id,status
    A1,ready
    A2,hold
    A3,ready
    A4,
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

CSV opens in one column? Identify the delimiter first

Choose the separator that produces the expected fields, while respecting quoted text.

  • Comma-separated example CSV
    Preview file text
    product,note,quantity
    Notebook,"Blue, lined",4
    Folder,Archive; keep dry,2
    

    First 400 characters at most. Download the file for the complete example.

  • Semicolon-separated example CSV
    Preview file text
    product;note;quantity
    Notebook;Blue, lined;4
    Folder;"Archive; keep dry";2
    

    First 400 characters at most. Download the file for the complete example.

  • Tab-separated example TSV
    Preview file text
    product	note	quantity
    Notebook	Blue, lined	4
    Folder	Archive; keep dry	2
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Detect duplicate CSV headers before values disappear

Read the header as a list and reject duplicate names before using csv.DictReader. Two columns with the same name cannot remain separate values under one dictionary key.

  • Synthetic CSV sample CSV
    Preview file text
    id,city,city
    A1,Paris,Lyon
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Export only selected CSV columns with an allowlist

Name the columns you want to keep and write only those fields. An allowlist is easier to review than deleting a few unwanted columns from an export that may later gain new fields.

  • Synthetic CSV sample CSV
    Preview file text
    id,quantity,internal_note
    P1,2,synthetic note
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Fill down CSV group labels without crossing boundaries

Carry the last group label forward only within an agreed section. Reset it at a section boundary so a later unlabeled row cannot inherit the previous group accidentally.

  • Synthetic CSV sample CSV
    Preview file text
    group,id
    north,A1
    ,A2
    ,
    ,A3
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Filter CSV rows with text and numeric conditions

Parse the numeric field explicitly, then combine the conditions using the intended Boolean rule. Report invalid numbers instead of treating them as rows that merely fail the filter.

  • Synthetic CSV sample CSV
    Preview file text
    id,status,qty
    A1,ready,12
    A2,ready,2
    A3,hold,20
    A4,ready,many
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Find CSV duplicates using a two-column key

Use a tuple of the key columns to identify duplicate records. Concatenating values can create collisions between different pairs, even when neither column contains a separator.

  • Synthetic CSV sample CSV
    Preview file text
    order_id,line,qty
    12,3,1
    1,23,2
    12,3,4
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Find CSV rows with too many or too few columns

Parse the CSV into lists and compare every record length with the header length. Report mismatches before converting rows to dictionaries, where missing and extra fields are easier to overlook.

  • Synthetic CSV sample CSV
    Preview file text
    id,name,status
    A1,Ada,active
    A2,active
    A3,Bo,active,extra
    A4,,active
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Find gaps in an expected CSV number sequence

Compare the observed sequence numbers with an explicitly expected range. Report duplicates separately, because a duplicate cannot compensate for a missing number.

  • Synthetic CSV sample CSV
    Preview file text
    sequence
    101
    102
    102
    104
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Find missing required values in CSV records

Check required fields by name and treat an empty or whitespace-only string as missing. Keep the string 0 valid unless the field's business rule says otherwise.

  • Synthetic CSV sample CSV
    Preview file text
    id,quantity,note
    A1,0,
       ,2,check
    A3,,
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Fix dates that will not sort in Google Sheets

Inspect the underlying type and convert a known format before sorting the full table.

  • Date sorting control records CSV
    Preview file text
    record_id,date_text
    A,2026-10-02
    B,2026-02-11
    C,2026-01-09
    D,2026-12-01
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Fix decimal commas and thousands separators in Excel

Convert imported numeric text using explicit decimal and grouping marks, preserve blanks, and avoid turning an ambiguous amount into the wrong number.

  • Decimal separator examples CSV
    Preview file text
    raw_amount,decimal_mark,group_mark,expected
    "1.234,50",",",.,1234.50
    "1,234.50",.,",",1234.50
    "-12,75",",",.,-12.75
    "1,234",unknown,unknown,REVIEW
    ,",",.,BLANK
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Fix garbled accents when importing a CSV into Excel

Match the import encoding to the source bytes before saving a corrected copy.

  • UTF-8 without BOM CSV
    Preview file text
    city,label
    Montréal,Café
    Zürich,Crème
    

    First 400 characters at most. Download the file for the complete example.

  • UTF-8 with BOM CSV
    Preview file text
    city,label
    Montréal,Café
    Zürich,Crème
    

    First 400 characters at most. Download the file for the complete example.

  • Windows-1252 example CSV
    Preview file text
    city,label
    Montr�al,Caf�
    Z�rich,Cr�me
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Fix numbers stored as text without damaging identifiers

Diagnose numeric-looking text with ISNUMBER, convert quantity cells safely, preserve missing values, and keep identifiers such as 0012 unchanged.

  • Numeric text and identifier sample CSV
    Preview file text
    raw_value,meaning,expected
    12,quantity,12
    7,quantity,7
    3,quantity,3
    0012,identifier,0012
    ,missing,BLANK
    12 kg,quantity_with_unit,REVIEW
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Keep leading zeros when importing a CSV into Excel

Set identifier columns to Text during import, before Excel interprets the digits.

  • Product IDs with leading zeros CSV
    Preview file text
    product_id,product,quantity
    00123,Blue notebook,4
    00007,Pencil case,12
    01230,Desk tray,2
    123,Refill pack,8
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Long numbers in Excel: formatting or lost digits?

Compare the stored identifier with the source before changing its display.

  • Long identifier comparison file CSV
    Preview file text
    record_id,purpose
    123456789012345,15-digit control
    1234567890123456,16-digit identifier
    1234567890123457,Different final digit
    0001234567890123456,Leading zeros and long identifier
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Map CSV category aliases without guessing unknown values

Use an explicit alias-to-canonical mapping and report unknown labels. Preserve the original value so each change remains explainable.

  • Synthetic CSV sample CSV
    Preview file text
    id,status
    A1,in progress
    A2,working
    A3,paused
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Pivot CSV from long to wide without aggregation

Use one field as the row key and another as the column key. Reject duplicate pairs unless an aggregation rule has been explicitly chosen, and keep missing observations distinct from zero.

  • Synthetic CSV sample CSV
    Preview file text
    product,month,value
    P1,2026-01,2
    P1,2026-02,3
    P2,2026-01,0
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Read headerless CSV without losing the first row

Provide field names yourself when the file has no header. Check each row width, then pair its values with the agreed column names. Do not let the first data record become the header.

  • Synthetic CSV sample CSV
    Preview file text
    001,2,ready
    002,5,hold
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Reconcile CSV counts after filtering

Put every source record into exactly one outcome and verify that the outcome counts sum to the input count. Keep invalid data separate from valid records excluded by a filter.

  • Synthetic CSV sample CSV
    Preview file text
    id,status,qty
    A1,ready,2
    A2,hold,3
    A3,ready,bad
    A4,ready,0
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Remove blank CSV rows with Python

Parse the CSV before removing rows. Drop empty records and rows whose fields are all empty strings; keep quoted line breaks, partially filled records, zeros, and whitespace.

Read the steps and expected result

Remove exact duplicate CSV rows and keep their order

Compare the complete parsed row and keep its first occurrence. Do not deduplicate by identifier alone when two records with the same identifier may contain different values.

  • Synthetic CSV sample CSV
    Preview file text
    id,status
    A1,ready
    A1,ready
    A1,hold
    A2,ready
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Remove invisible spaces that break Excel matches

Clean ordinary and nonbreaking spaces with a targeted formula, inspect character lengths, and avoid merging identifiers that should stay distinct.

  • Invisible Unicode space sample CSV
    Preview file text
    raw_value,expected
      ACME  West  ,ACME West
     ACME West ,ACME West
    ACME West,ACME West
    AB CD,AB CD
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Remove repeated header rows from a combined CSV

Compare each parsed record with the original header and remove exact matches only when the export format confirms they are repeated headings.

  • Synthetic CSV sample CSV
    Preview file text
    id,status
    A1,ready
    id,status
    id,ready
    A2,hold
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Rename CSV columns with an explicit mapping

Map old header names to new names, preserve their positions, and check the resulting names for collisions. Renaming a header does not require changing any data value.

  • Synthetic CSV sample CSV
    Preview file text
    sku,qty
    P1,2
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Sort a CSV numeric column without lexicographic mistakes

Convert the sort key to a number, but keep the original record for output. Sorting the original strings puts 10 before 2 because it compares characters rather than quantities.

  • Synthetic CSV sample CSV
    Preview file text
    id,quantity
    A,10
    B,2
    C,1
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Sort CSV rows by category and descending quantity

Build a tuple key in priority order. For an ascending category and descending integer quantity, use the category followed by the negative quantity, then an explicit tie-breaker.

  • Synthetic CSV sample CSV
    Preview file text
    id,category,qty
    A2,a,10
    B1,b,99
    A1,a,10
    A3,a,2
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Split a multivalue CSV cell into separate records

Parse the outer CSV first, then split the selected field using its documented inner separator. Keep the parent identifier on every expanded row and define what empty items mean.

  • Synthetic CSV sample CSV
    Preview file text
    product,tags
    P1,red|large
    P2,blue|
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Sum CSV amounts by group with decimal arithmetic

Parse amounts with Decimal and group by every field that defines a comparable total, including currency. Do not combine different currencies into one unlabeled sum.

  • Synthetic CSV sample CSV
    Preview file text
    team,currency,amount
    ops,USD,0.10
    ops,USD,0.20
    ops,EUR,1.50
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Transpose a small CSV without truncating short rows

Check that every row has the same width, then transpose the table. A plain zip on ragged rows can truncate values to the shortest row without warning.

  • Synthetic CSV sample CSV
    Preview file text
    metric,P1,P2
    price,2,3
    stock,5,7
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Unpivot CSV month columns into a long table

Keep the identifier columns fixed and emit one output record for each selected value column. Decide explicitly whether blank cells should become blank observations or be omitted.

  • Synthetic CSV sample CSV
    Preview file text
    product,2026-01,2026-02
    P1,2,3
    P2,0,
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result

Validate CSV status values against an allowed list

Compare each value with the documented allowed set and report anything outside it. Keep unexpected values visible until someone decides whether they are errors or new valid categories.

  • Synthetic CSV sample CSV
    Preview file text
    id,status
    A1,ready
    A2,Ready
    A3,paused
    

    First 400 characters at most. Download the file for the complete example.

Read the steps and expected result