Re:A love letter to the CSV format
by LPisGood on Wednesday March 26, 2025 @03:02PM
(#43485666)
I always treat CSVs as comma separated values with new line delimiters. If it’s a new line, it’s a new row.
[ Parent
| on HN ]
Do you ever have CSV data that has newlines within a string?
Re:A love letter to the CSV format
by thesuitonym on Wednesday March 26, 2025 @03:12PM
(#43485800)
I don't. If I ever have a dataset that requires newlines in a string, I use another method to store it.
I don't know why so many people think every solution needs to to be a perfect fit for every problem in order to be viable. CSV is good at certain things, so use it for those things! And for anything it's not good at, use something else!
I don't think we do? It's more that a bunch of companies already have their data in CSV format and aren't willing to invest any effort in moving to a new format. Doesn't matter how much one extolls all the benefits, they know right? They're paying someone else to deal with it.
> use something else
You don't always get to pick the format in which data is provided to you.
Re:A love letter to the CSV format
by thesuitonym on Wednesday March 26, 2025 @03:38PM
(#43486194)
True, but in that case I'm not the one choosing how to store it, until I ingest the data, and then I will store it in whatever format makes sense to me.
No - that’s what I’m trying to say. If I have newlines I use something else.
Wouldn't work if csv is used as a exchange format with external companies.