Skip to main content

tabkit

A CLI TSV MR kit (a command-line interface tab-separated values map-reduce kit). Powered by coreutils.

Overview

$ cat fruits | tpretty

 fruit   | price:float
---------+-------------
 apple   | 1.04
 kumquat | 4.99
 orange  | 2.07

$ cat sales | tpretty

 fruit   | qty:int | paid:bool
---------+---------+-----------
 apple   | 10      | 1
 apple   | 7       | 0
 apple   | 1       | 1
 orange  | 3       | 1
 orange  | 18      | 1
 orange  | 4       | 0
 orange  | 2       | 1
 kumquat | 1       | 1
 kumquat | 2       | 1

$ cat sales \
        | tmap_awk -f paid \
        | tsrt -k fruit \
        | tjoin -j fruit - fruits \
        | tgrp_awk -g fruit -o "sum_qty=sum(qty)" -o "sum_paid=sum(qty*price)" \
        | tpretty

 fruit   | sum_qty:int | sum_paid:float
---------+-------------+----------------
 apple   | 11          | 11.44
 kumquat | 3           | 14.97
 orange  | 23          | 47.61

tcat

Concatenate FILE(s), or standard input, to standard output.

1.tsv:

# apples    oranges
1   foo
2   bar

2.tsv:

# apples    oranges
3   baz
4   bam
$ tcat 1.tsv 2.tsv
# apples    oranges
1   foo
2   bar
3   baz
4   bam

tcut

Print selected columns from each FILE to standard output.

input.csv:

# good  bad also_good
1   apple   foo
2   orange  bar
3   lemon   baz
$ cat input.csv | tcut -f good,also_good
#   good    also_good
1   foo
2   bar
3   baz

tsrt

Write sorted concatenation of all FILE(s) to standard output.

input.csv:

# number    fruit
10  apple
3   orange
10  lemon
$ cat input.csv | tsrt -k good:num,fruit:desc
# number    fruit   # ORDER: number:num, fruit:desc
3   orange
10  lemon
10  apple

tmap_awk

Perform a map operation on the input FILE(s).

input.csv:

# x
.1
4
-0.5
0
$ cat input.csv | tmap_awk -f 'x>0' -o 'y=log(x)'
# y:float
-2.30259
1.38629

Metadata

Release files for tabkit 0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tabkit 0.13
File Size Uploaded
tabkit-0.13.tar.gz 14.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tabkit 0.13
File Interpreter ABI Platform
tabkit-0.13-py2.7.egg Legacy Egg format - - Details

Total release size: 57.9 kB

Release files / tabkit-0.13.tar.gz

Download URL tabkit-0.13.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3619e62395fc09a407338b8230ccb733fd4ffa39b1a13b2e87c54d03d42fae83
BLAKE2b-256 checksum
How to use checksums
c58086d49389a22ae996505a71e90ce3f8c288ed95c250332dc16fc22548fee5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tabkit-0.13-py2.7.egg

Download URL tabkit-0.13-py2.7.egg
Size 43.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
0d8e70c01a67e8feffb1003e2bb1cc5a88481e5de7f958529777cf3ad0def431
BLAKE2b-256 checksum
How to use checksums
22e1d10fefdefa529daba7bbe7ead1970e668686a582eca8327694f069798ae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.13 This release

2 release files

0.12

2 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page