CSVtoTableでCSVファイルをソート可能なHTMLテーブルに変換
CSVtoTable
github.com
CSVtoTableというツールを使うとCSVファイルをソート可能なHTMLテーブル(中身はDataTables)に変換することができる。デモはここで確認可能。

インストール
pipでインストールできる。
$ pip install csvtotable
$ csvtotable --help
Usage: csvtotable [OPTIONS] INPUT_FILE [OUTPUT_FILE]
CSVtoTable commandline utility.
Options:
-c, --caption TEXT Table caption
-d, --delimiter TEXT CSV delimiter
-q, --quotechar TEXT String used to quote fields containing
special characters
-dl, --display-length INTEGER Number of rows to show by default. Defaults
to -1 (show all rows)
-o, --overwrite Overwrite the output file if exisits.
-s, --serve Open output html in browser instead of
writing to file.
-h, --height TEXT Table height in px or in %.
-p, --pagination Enable/disable table pagination.
-vs, --virtual-scroll INTEGER Number of rows after which virtual scroll is
enabled.Set it to -1 to disable and 0 to
always enable.
-nh, --no-header Disable displaying first row as headers.
--help Show this message and exit.使い方
CSVファイルをHTMLファイルに変換する場合は下記コマンドを実行。
$ csvtotable data.csv data.html
HTMLファイルに出力せずに直接ブラウザで開く場合は下記コマンドを実行。
$ csvtotable data.csv --serve