Comments (5)
Given @rzmk 's feedback, we'll add a percentage column:
field, value, count, percentage
state, NY, 100, 12.90
state, NJ, 70, 9.03
state, CA, 60, 7.74
state, MA, 55, 7.10
state, FL, 45, 5.81
state, TX, 43, 5.55
state, NM, 40, 5.16
state, AZ, 39, 5.03
state, NV, 38, 4.90
state, MI, 35, 4.52
state, OTHER (40), 250, 32.26
with the OTHER
text being followed by the sum of other unique field values, enclosed in parentheses.
from qsv.
Another thing that may be useful is adding a flag to also add a column for the percentage/decimal based on the frequency/(total rows). Could maybe use qsv count
for the total rows part.
from qsv.
Also I'm curious how --other
would handle if a value itself is named OTHER
.
from qsv.
Maybe for --other
it could be consolidated to --other <text>
with default OTHER
?
from qsv.
The percentage option is a great idea. And for --other
, maybe we can add another option called --other-text
with a default value of OTHER
. It should be easy to add some field value collision logic on the off chance a valid field value is OTHER
.
from qsv.
Related Issues (20)
- qsv validate - valid pass feature request HOT 2
- What would it take to get `foreach` working on Windows? HOT 5
- `stats` & `frequency`: add a `--json` flag for JSON output
- `foreach`: add `--dry-run` option HOT 1
- qsv count HOT 1
- Locating.installing qsv HOT 2
- sql windows functions HOT 7
- add `--no-headers` support to qsv cat rowskey HOT 2
- group by HOT 1
- `luau`: additional helper functions
- `search`: add preview and JSON options HOT 1
- `search` & `searchset`: when a CSV is indexed, parallelize search
- partition file into files with n rows each (except for last file) HOT 7
- `stats` command writes output file even when `--output` is not set HOT 7
- `stats`: Max precision for float types HOT 5
- sqlp selects wrong data when multiple tables have the same named column HOT 8
- Getting "usage error: " prepended to help messages for commands HOT 1
- Can qsv reverse or sort column order? HOT 7
- `select`: tweak lastcol sentinel and `--sort` and `--random` behaviors 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 qsv.