shenwei356 / shenwei356/csvtk

[FEAT] `sample-longest`

Open
#357 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.2k
Forks
96
PR merge metrics
No merged PRs in 30d

Description

csvtk already has a few commands to sample data: sample, corr, summary.
But I want a new one :-) It's useful to understand the "meaning" of cols by looking at "interesting" values in each col.

return the longest value of each column.

Usage:
  csvtk sample-longest [flags]

Flags:
  -n  --number int       print N rows (default 1)
  -N  --max-number int   sample from first N rows (default all)

This is useful to find "interesting" values in each col, in order to understand the "meaning" of each col.
Beware that there will be no correlation between the values in each returned row!

We have a python script for this, if it's of interest to someone.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing sample, corr, and summary command implementations and locate the referenced Python script if it is in the repository. Confirm how commands parse CSV/TSV columns and flags, then implement the documented longest-value behavior and verify that the requested row and maximum-row options work as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.