Comments (7)
xsv table
doesn't print the parsed contents of CSV data. It just rewrites the input CSV as tab-delimited CSV, and then expands the tabs in the output as per elastic tabstops. This is easy to see in the implementation:
Lines 49 to 71 in 4278b85
It does seem plausible that it would be better to print the parsed contents (i.e., after unescaping quotes).
from xsv.
xsv table
doesn't print the parsed contents of CSV data. It just rewrites the input CSV as tab-delimited CSV, and then expands the tabs in the output as per elastic tabstops. This is easy to see in the implementation:
Lines 49 to 71 in 4278b85
It does seem plausible that it would be better to print the parsed contents (i.e., after unescaping quotes).
I ran into something similar for
xsv fmt --ascii
. Printing the parsed contents would be much more useful of a feature; one turns to ASV precisely so that you don't need to escape strings!
xsv fmt --ascii
should definitely not print the parsed contents. It should print CSV data. And insert quoting when necessary. But it does look like it is inserting quotes when it shouldn't for --ascii
.
from xsv.
The thing that confused me the most was that it does remove the quotes around "a"
.
Is the output of xsv table
intended to be parseable as CSV too?
from xsv.
The thing that confused me the most was that it does remove the quotes around
"a"
.
Yes, because the CSV writer knows when quotes are necessary. They aren't necessary to write a
.
Is the output of xsv table intended to be parseable as CSV too?
No. As I said, the tabs are expanded to spaces. So it's very deliberately not CSV. It's for human consumption. Which is arguably why this should be treated as a bug and the quotes should be unescaped.
from xsv.
That's what I thought!
Can I help? Xsv is a great tool 😄
from xsv.
xsv table
doesn't print the parsed contents of CSV data. It just rewrites the input CSV as tab-delimited CSV, and then expands the tabs in the output as per elastic tabstops. This is easy to see in the implementation:Lines 49 to 71 in 4278b85
It does seem plausible that it would be better to print the parsed contents (i.e., after unescaping quotes).
I ran into something similar for xsv fmt --ascii
. Printing the parsed contents would be much more useful of a feature; one turns to ASV precisely so that you don't need to escape strings!
from xsv.
xsv fmt --table
? 🤔
from xsv.
Related Issues (20)
- Escaping unescaped quotes in quoted strings modifies the data HOT 2
- support unbalanced partitioning HOT 1
- sample the whole file HOT 1
- bug: xsv count HOT 3
- Frequency command causes allocated memory exhausted message on csv file with many fields
- Add Parquet support
- fixlengths is missing the field delimiter option for output (-t)
- what format is accepted for non printable delimiter?
- support flexible format csv
- Escape square bracket in column header? HOT 1
- `sample` command with alternative delimiter: Could not deserialize to u64 for '<sample-size>'. HOT 2
- `xsv join --cross` shouldn't require columns to match HOT 1
- crc32 a column's values?
- sort by mixed column types, some numeric and some non-numeric, some forward and some reverse
- Looking for a solution to clear column data but not the headers
- Flexible input options for quote and escape in `fixlengths`
- `xsv table` has unexpected output with long input (too-wide tabs, missing tabs) HOT 3
- set delimiter config before parsed by xsv HOT 3
- Just want to say thank you HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xsv.