miller README

The project's README from github.com/johnkerl/miller. As one markdown file: README.md.

What is Miller?

Miller is like awk, sed, cut, join, and sort for data formats such as CSV, TSV, JSON, JSON Lines, and positionally-indexed.

What can Miller do for me?

With Miller, you get to use named fields without needing to count positional indices, using familiar formats such as CSV, TSV, JSON, JSON Lines, and positionally-indexed. Then, on the fly, you can add new fields which are functions of existing fields, drop fields, sort, aggregate statistically, pretty-print, and more.

cover-art

In the above image you can see how Miller embraces the common themes of key-value-pair data in a variety of data formats.

Installing

There's a good chance you can get Miller pre-built for your system: Ubuntu Ubuntu 16.04 LTS Fedora Debian Gentoo Pro-Linux Arch Linux NetBSD FreeBSD Anaconda Snap Homebrew/MacOSX MacPorts/MacOSX Chocolatey WinGet

OS Installation command
Linux yum install miller
apt-get install miller
snap install miller
Mac brew install miller
port install miller
Windows choco install miller
winget install Miller.Miller
scoop install main/miller

See also README-versions.md for a full list of package versions. Note that long-term-support (LtS) releases will likely be on older versions.

See also building from source.

Features

Getting started

deepwiki

More documentation links

Community

GitHub stars Homebrew downloads Conda downloads

All Contributors

Build status

Multi-platform build status CodeQL status Codespell status 🧪 Snap Builds

Building from source

For developers

License

License: BSD2

What people are saying about Miller

Today I discovered Miller—it's like jq but for CSV: https://t.co/pn5Ni241KM

Also, "Miller complements data-analysis tools such as R, pandas, etc.: you can use Miller to clean and prepare your data." @GreatBlueC @nfmcclure

— Adrien Trouillaud (@adrienjt) September 24, 2020

Underappreciated swiss-army command-line chainsaw.

"Miller is like awk, sed, cut, join, and sort for [...] CSV, TSV, and [...] JSON." https://t.co/TrQqSUK3KK

— Dirk Eddelbuettel (@eddelbuettel) February 28, 2017

Miller looks like a great command line tool for working with CSV data. Sed, awk, cut, join all rolled into one: http://t.co/9BBb6VCZ6Y

— Mike Loukides (@mikeloukides) August 16, 2015

Miller is like sed, awk, cut, join, and sort for name-indexed data such as CSV: http://t.co/1zPbfg6B2W - handy tool!

— Ilya Grigorik (@igrigorik) August 22, 2015

Btw, I think Miller is the best CLI tool to deal with CSV. I used to use this when I need to preprocess too big CSVs to load into R (now we have vroom, so such cases might be rare, though...)https://t.co/kUjrSSGJoT

— Hiroaki Yutani (@yutannihilat_en) April 21, 2020

Miller: a *format-aware* data munging tool By @__jo_ker__ to overcome limitations with *line-aware* workshorses like awk, sed et al https://t.co/LCyPkhYvt9

The project website is a fantastic example of good software documentation!!

— Donny Daniel (@dnnydnl) September 9, 2018

Holy holly data swiss army knife batman! How did no one suggest Miller https://t.co/JGQpmRAZLv for solving database cleaning / ETL issues to me before

Congrats to @__jo_ker__ for amazingly intuitive tool for critical data management tasks!#DataScienceandLaw #ComputationalLaw

— James Miller (@japanlawprof) June 12, 2018

🤯@__jo_ker__'s Miller easily reads, transforms, + writes all sorts of tabular data. It's standalone, fast, and built for streaming data (operating on one line at a time, so you can work on files larger than memory).

And the docs are dream. I've been reading them all morning! https://t.co/Be2pGPZK6t

— Benjamin Wolfe (he/him) (@BenjaminWolfe) September 9, 2021

Contributors ✨

Thanks to all the fine people who help make Miller better (emoji key):


Andrea Borruso

🤔 🎨

Shaun Jackman

🤔

Fred Trotter

🤔 🎨

komosa

🤔

jungle-boogie

🤔

Thomas Klausner

🚇

Stephen Kitt

📦

Leah Neukirchen

🤔

Luigi Baldoni

📦

Hiroaki Yutani

🤔

Daniel M. Drucker

🤔

Nikos Alexandris

🤔

kundeng

📦

Victor Sergienko

📦

Adrian Ho

🎨

zachp

📦</

miller (johnkerl/miller)

Searching Database…

10K ·GitHub
这是什么?Miller 是一个命令行工具集,类似于 awk、sed、cut、join 和 sort,但专为 CSV、TSV、JSON 和 JSON Lines 这类带名称索引的数据而设计:你可以按字段名来操作,而不用去数列的位置。
那它是要导入的库,还是直接运行的命令?它是一个独立的命令行可执行文件,不是库。传统的 Unix 工具看到的是带编号的数组位置,而 Miller 把每条记录看成保持插入顺序的键值对,并且处理时会感知数据格式。
我这台机器上用什么命令安装?预编译包:macOS 上有 brew 或 port;Linux 上有 yum、apt 或 snap;Windows 上有 choco、winget 或 scoop(例如 winget install Miller.Miller)。用 make 或 go install 从源码构建也可以。
需要先装什么运行环境或库吗?不需要。Miller 用可移植的现代 Go 编写,零运行时依赖——就是一个单独的二进制文件,你可以 scp 到远程机器上直接运行。
软件包管理器里的版本是最新的吗?不一定:README 提到长期支持(LtS)版本通常比较旧,如果需要最新版,请查看 README-versions.md 或从源码构建。
做数据处理时,为什么选 Miller 而不是 pandas 或 R?两者是互补关系,不是竞争关系:你可以先用 Miller 在命令行里清洗和准备数据,再把结果加载到 R 或 pandas 里做更深入的统计和绘图。它的流式单遍算法还能在那些工具读入数据之前,先把非常大的文件压缩缩小。
它能在不同格式之间转换文件吗?可以——它支持的输入输出格式包括 CSV、TSV、JSON、JSON Lines、按位置索引的格式以及美观的表格输出,Miller 可以在这些格式之间互相转换。转换时会感知格式,比如对 CSV 排序时,表头行仍会保持在最前面。
这个命令具体叫什么名字?mlr——这就是你要运行的可执行文件(Windows 上是 mlr.exe)。从源码构建会得到 ./mlr,用 go install 则会把它装到 GOPATH/bin 里。
能不能把它当成文件上的快速数据库来用?对于临时任务,可以:README 强调,当你赶时间时,无需任何安装配置就能直接查询磁盘文件里的数据;Miller 还能在数据导入或导出 SQL 数据库的过程中,顺手对数据进行切分、筛选和重新格式化。
What are similar projects?visidata, xsv, q, yq, fx, gron, SolidityScanLegend, coreutils
Creator
johnkerl
Size
212.2 MB
Stars
10K
Age
11y
Commits · 90 Days