3 ms·
I found that for most problems where people use Excel I prefer CSV, various command line tools (awk, perl and the awesome xsv) and Vim. I'm regularly faster t
by weinzierl 8y ago
I found that for most problems where people use Excel I prefer CSV, various command line tools (awk, perl and the awesome xsv) and Vim.
I'm regularly faster that way. When data manipulation is involved my solutions are robuster, more reliable, work well even for huge data sets and most importantly: they are reproducible.
That being said, there are two features that Excel - or any other spreadsheet software for that matter - provides, which are missing from any Vim solution I have found:
1. Hiding overly long cells.
In most tables I see most of the cells have reasonably short lengths,
but almost always there are a few overly long outliers.
What I want is a way to manually set the column width and then all
outliers cut-off. When vim's conceal feature came out I hoped someone
would make a plugin to that effect, but as far as I know no one ever did.
Looking into the problem myself a while ago, I found that it's not trivial to do.
2. Quick and easy filtering.
I find the column filters in Excel pretty useful.
The first value they provide is that they give an overview
what values are actually used in the column. Second value is
to temporarily hide all the rows one is not interested in.
They are also very easy to use. I would like to have some
easy way to do that in Vim just for viewing and without actually
manipulating the file.
- danso 8y agoxsv is great -- as is csvkit, which preceded it and is probably a bit slower, but has a few extra utilities that I find essential: - in2csv: extracts Excel worksheets into CSV - csvsql: produces (and executes) the SQL needed to create a table and insert the data from a CSV I found these scripts to be profoundly useful when working with govt data and needing to provide a automated workflow that collects and collates their Excel spreadsheets and converts them into CSV and SQLite databases.
- raihansaputra 8y agoI think 2 is fulfilled with xsv with the frequency command and the select command. It's 2 commands, but it's not excel and it's reproducible. I find the source code is kinda helpful to see what arguments I should set or how it works.
- swiley 8y agoI personally prefer just strait sqlite3 and then R or maybe awk for automation. There are tons of interactive tools that can be used with it too if you want that.