1. XenForo 1.5.14 中文版——支持中文搜索!现已发布!查看详情
  2. Xenforo 爱好者讨论群:215909318 XenForo专区

新闻 Miller 5.3.0 发布,CSV 和 JSON 处理工具 下载

本帖由 漂亮的石头2018-01-07 发布。版面名称:软件资讯

  1. 漂亮的石头

    漂亮的石头 版主 管理成员

    注册:
    2012-02-10
    帖子:
    488,109
    赞:
    47
    Miller 5.3.0 已发布,Miller 是一个类似 sed、awk、cut、join 和 sort 工具,用来处理基于命名索引的数据,如 CSV、TSV 和 tabular JSON 。

    该版本包括文档改进和 bug 修复,以及如下特性:


    • Comment strings in data files: mlr --skip-comments allows you to filter out input lines starting with #, for all file formats. Likewise, mlr --skip-comments-with X lets you specify the comment-string X. Comments are only supported at start of data line. mlr --pass-comments and mlr --pass-comments-with X allow you to forward comments to program output as they are read.


    • The count-similar verb lets you compute cluster sizes by cluster labels.


    • While Miller DSL arithmetic gracefully overflows from 64-integer to double-precision float (see also here), there are now the integer-preserving arithmetic operators .+ .- .* ./ .// for those times when you want integer overflow.


    • There is a new bitcount function: for example, echo x=0xf0000206 | mlr put '$y=bitcount($x)'produces x=0xf0000206,y=7.


    • Issue 158: mlr -T is an alias for --nidx --fs tab, and mlr -t is an alias for mlr --tsvlite.


    • The mathematical constants π and e have been renamed from PI and E to M_PI and M_E, respectively. (It's annoying to get a syntax error when you try to define a variable named E in the DSL, when A through D work just fine.) This is a backward incompatibility, but not enough of us to justify calling this release Miller 6.0.0.

    请查阅发行主页了解详情

    下载地址:


    效果示例:

    before

    county,tiv_2011,tiv_2012,line,construction
    SEMINOLE,22890.55,20848.71,Residential,Wood
    MIAMI DADE,1158674.85,1076001.08,Residential,Masonry
    PALM BEACH,1174081.5,1856589.17,Residential,Masonry
    MIAMI DADE,2850980.31,2650932.72,Commercial,Reinforced Masonry
    HIGHLANDS,23006.41,19757.91,Residential,Wood
    HIGHLANDS,49155.16,47362.96,Residential,Wood
    DUVAL,1731888.18,2785551.63,Residential,Masonry
    ST. JOHNS,29589.12,35207.53,Residential,Wood

    after

    $ mlr --icsv --opprint --barred \
    put '$tiv_delta = $tiv_2012 - $tiv_2011; unset $tiv_2011, $tiv_2012' \
    then sort -nr tiv_delta flins.csv
    +------------+-------------+----------------+
    | county | line | tiv_delta |
    +------------+-------------+----------------+
    | Duval | Residential | 1053663.450000 |
    | Palm Beach | Residential | 682507.670000 |
    | St. Johns | Residential | 5618.410000 |
    | Highlands | Residential | -1792.200000 |
    | Seminole | Residential | -2041.840000 |
    | Highlands | Residential | -3248.500000 |
    | Miami Dade | Residential | -82673.770000 |
    | Miami Dade | Commercial | -200047.590000 |
    +------------+-------------+----------------+
    Miller 5.3.0 发布,CSV 和 JSON 处理工具下载地址
     
正在加载...