Comments (6)
e.g. for this file:
First,Second,Third
10,5,2
5,2,10
2,10,5
10,5,2
output it like this:
First, Second, Third
10, 5, 2
5, 2, 10
2, 10, 5
10, 5, 2
(and optionally aligning colums (without the delimiter) like this (for leftaligning):
First ,Second ,Third
10 ,5 ,2
5 ,2 ,10
2 ,10 ,5
10 ,5 ,2
from xsv.
That doesn't really make sense to me. What is your use case? xsv table
is for making CSV files human readable on the console. Keeping the delimiters in the output conflicts with this goal. xsv table
's purpose is to replace delimiters with the right number of spaces.
Aside from that, I'm especially unlikely to implement this. The existing command is especially simple because it relies on an implementation of elastic tabstops.
from xsv.
I am hoping to use xsv if available to arrange csv files within vim. I have a vim CSV plugin, screencast (Look for the :ArrangeCol command) That allows to align csv files and instead of calculating the correct width and aligning it manually, I'd like to use xsv if possible. Because this is faster (which makes a difference for bigger csv files). But this makes only sense, if I can keep the delimiter, and second (optionally) be able to specify how to align certain columns.
from xsv.
That's an impressive plugin!
Honestly, I'm not sure that the command you're after is a good fit for xsv
. It seems rather specialized and of limited practical use. If you wanted to write a new command called align
as part of xsv
and it was simple enough, I'd probably be willing to maintain it. But I think that's about the best I can do.
If I saw an easy way to do this on top of xsv table
, then I might do it. But unfortunately, most of the complexity is buried in elastic tabstops which has no knowledge of delimiter separated values.
from xsv.
Okay, thanks. I'll check, if csvkit can help me.
from xsv.
OK, good luck! As far as I know, csvkit
's closest thing is csvlook
, but it has lots of formatting that probably won't work for you.
You might also consider investigation the column
command that is part of util-linux
.
from xsv.
Related Issues (20)
- Please add Contributing.md HOT 2
- On motivation HOT 4
- --compress-program option for xsv split? HOT 4
- Ignore bad lines instead of crashing HOT 3
- Investigate increasing Maintainer Productivity with Pull Requests Environments HOT 1
- "@list" external parameter list
- Split a column
- xsv fixlengths never finishes on some input HOT 1
- How to avoid extra quotes HOT 1
- Is it possible to generate a new csv from the associated fields of two csv's? HOT 2
- Use file name patterns in cat HOT 1
- New build needed for `reverse`
- Scanning of "cargo-geiger" showed unsafe code HOT 1
- xsv might silently fail
- Cargo test failed on Windows
- fixlengths -- insert extra commas not at end
- 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
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.