<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muse AI Lab</title>
    <description>The latest articles on DEV Community by Muse AI Lab (@museailab).</description>
    <link>https://dev.to/museailab</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4218702%2Fe9fd3980-7cea-4c7a-ba6c-efb125fab5db.png</url>
      <title>DEV Community: Muse AI Lab</title>
      <link>https://dev.to/museailab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/museailab"/>
    <language>en</language>
    <item>
      <title>My CSV import kept failing — so I documented every single fix (with the change log)</title>
      <dc:creator>Muse AI Lab</dc:creator>
      <pubDate>Sat, 31 Oct 2026 09:18:37 +0000</pubDate>
      <link>https://dev.to/museailab/my-csv-import-kept-failing-so-i-documented-every-single-fix-with-the-change-log-cf5</link>
      <guid>https://dev.to/museailab/my-csv-import-kept-failing-so-i-documented-every-single-fix-with-the-change-log-cf5</guid>
      <description>&lt;p&gt;Every import guide says the same thing: "just upload your CSV." Nobody talks about what happens when the file itself is the problem.&lt;/p&gt;

&lt;p&gt;I recently cleaned a 58-row product CSV (demo data I built to mirror a real supplier file) that failed to import into an e-commerce backend. Here is exactly what was wrong with it, and what a careful fix looks like.&lt;/p&gt;

&lt;h2&gt;
  
  
  The patient
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Encoded in &lt;strong&gt;Shift-JIS&lt;/strong&gt; (it came from a Japanese Windows machine), so product names turned to mojibake in a UTF-8 system&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semicolon-delimited&lt;/strong&gt;, because the spreadsheet that exported it used a locale where commas are decimal separators&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Five different date formats&lt;/strong&gt; in one column: &lt;code&gt;2026/08/14&lt;/code&gt;, &lt;code&gt;09-05-2026&lt;/code&gt;, &lt;code&gt;Sep 17 2026&lt;/code&gt;, &lt;code&gt;20260928&lt;/code&gt;, &lt;code&gt;2026-09-11&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Prices like &lt;code&gt;$142.48&lt;/code&gt;, &lt;code&gt;210.80&lt;/code&gt; and &lt;code&gt;68.03&lt;/code&gt; in the same column&lt;/li&gt;
&lt;li&gt;Header row: &lt;code&gt;SKU&lt;/code&gt;, &lt;code&gt;Product_Name&lt;/code&gt;, &lt;code&gt;CATEGORY&lt;/code&gt;, &lt;code&gt;Price (USD)&lt;/code&gt;, &lt;code&gt;DATE_ADDED&lt;/code&gt; — no two headers formatted alike&lt;/li&gt;
&lt;li&gt;4 duplicate rows, 2 completely empty rows, 2 rows with required fields missing&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The change log (this is the deliverable that matters)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Header: [' SKU ', 'Product_Name', 'CATEGORY', 'Price (USD)', 'stock_qty', 'DATE_ADDED', 'Brand', 'Supplier_Email']
     -&amp;gt; ['sku', 'product_name', 'category', 'price_usd', 'stock_qty', 'date_added', 'brand', 'supplier_email']

- encoding: Shift-JIS -&amp;gt; UTF-8
- delimiter: semicolon -&amp;gt; comma
- headers_renamed: 7
- dates_normalized: 48
- prices_cleaned: 28
- emails_normalized: 37
- duplicates_removed: 4
- empty_rows_dropped: 2
- input rows: 58 -&amp;gt; output rows: 50

Flagged (NOT silently dropped):
- line 55 [SKU-1008]: duplicate SKU with a conflicting price — kept the first, flagged for a human decision
- line 58 [SKU-9001]: missing price
- line 59 [(no sku)]: missing SKU
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Three rules I follow when fixing data files
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never invent a value.&lt;/strong&gt; A missing price is flagged, not guessed. The moment a cleanup tool "helpfully" fills in data, you can't trust any of it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every change gets logged.&lt;/strong&gt; If a fix can't be explained row by row, it didn't happen carefully enough.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic tools first, AI second.&lt;/strong&gt; Date parsing, dedup and encoding conversion are rule problems. Save judgment for the flagged rows — that's where humans (or an AI with the log in hand) actually add value.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The cleaned file imports on the first try, and the flagged list is three rows long instead of a 58-row mystery.&lt;/p&gt;

&lt;h2&gt;
  
  
  If your import is failing right now
&lt;/h2&gt;

&lt;p&gt;Check, in this order: encoding (open the file and look for garbled text), delimiter, date format consistency, and duplicate keys. That covers most "the system just says error" cases I've seen.&lt;/p&gt;

&lt;p&gt;And if you'd rather hand it off: I offer this exact cleanup as a small fixed-price service — send the broken file, get back the cleaned CSV plus the change log. Details: &lt;a href="https://www.getly.store/services/csv-rescue-clean-fix-broken-import-files" rel="noopener noreferrer"&gt;https://www.getly.store/services/csv-rescue-clean-fix-broken-import-files&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The sample data above is fictional demo data, created to show the process and the report format.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>csv</category>
      <category>data</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
