FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Spent 2 hours debugging CSV import. Turns out Excel added invisible characters.
NewsProgramming Languages

Spent 2 hours debugging CSV import. Turns out Excel added invisible characters.

via Dev.to PythonNico Reyes3h ago

Spent 2 hours debugging CSV import. Turns out Excel added invisible characters. Client sent me a CSV file yesterday. Simple product list with prices. Import it into my Python script and half the rows fail validation. Opened the CSV in a text editor. Everything looks fine. Columns are there. Data looks clean. Run the script again. Same errors. What broke My script was parsing product prices like this: import csv with open ( ' products.csv ' , ' r ' ) as f : reader = csv . DictReader ( f ) for row in reader : try : price = float ( row [ ' Price ' ]) print ( f " { row [ ' Product ' ] } : $ { price } " ) except ValueError : print ( f " Failed: { row [ ' Product ' ] } - Bad price: ' { row [ ' Price ' ] } '" ) Output showed weird stuff: Product A: $19.99 Failed: Product B - Bad price: '29.99' Product C: $39.99 Failed: Product D - Bad price: '49.99' The prices that failed looked identical to the ones that worked. Copy pasted them into the Python REPL. Worked fine there. Fun. Figured it out ev

Continue reading on Dev.to Python

Opens in a new tab

Read Full Article
0 views

Related Articles

Social gaming platform Rec Room, once valued at $3.5B, is shutting down
News

Social gaming platform Rec Room, once valued at $3.5B, is shutting down

TechCrunch • 9m ago

MLA+MOE based model and T5 comparison who wins?
News

MLA+MOE based model and T5 comparison who wins?

Medium Programming • 12m ago

[MM’s] Boot Notes — The Day Zero Blueprint — Operations from localhost to production without panic
News

[MM’s] Boot Notes — The Day Zero Blueprint — Operations from localhost to production without panic

Medium Programming • 14m ago

The US Military’s GPS Software Is an $8 Billion Mess
News

The US Military’s GPS Software Is an $8 Billion Mess

Wired • 40m ago

The Promise of 'Woke 2' Is Fueling a Leftist Fever Dream
News

The Promise of 'Woke 2' Is Fueling a Leftist Fever Dream

Wired • 42m ago

Discover More Articles