Code Monkey home page Code Monkey logo

Comments (5)

jqnatividad avatar jqnatividad commented on June 13, 2024 2

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.

rzmk avatar rzmk commented on June 13, 2024 1

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.

rzmk avatar rzmk commented on June 13, 2024 1

Also I'm curious how --other would handle if a value itself is named OTHER.

from qsv.

rzmk avatar rzmk commented on June 13, 2024 1

Maybe for --other it could be consolidated to --other <text> with default OTHER?

from qsv.

jqnatividad avatar jqnatividad commented on June 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.