Skip to main content

CSV/Excel から散布図 PNG を生成する CLI

Project description

pycsv2chart

[[TOC]]

pycsv2chart は CSV または Excel (.xlsx) を読み込み、散布図を PNG として出力する CLI です。

動作要件

  • Python 3.11 以上
  • 日本語ラベルを正しく表示するには、システムに日本語フォント(例: fonts-noto-cjk)のインストールを推奨します。フォントが無い場合は警告を出しますが、グラフ生成自体は続行します。

インストール

pip install pycsv2chart

ローカル wheel からインストールする場合:

uv pip install dist/pycsv2chart-*.whl

使い方

pycsv2chart -i data.csv -o chart.png

主なオプション

オプション 説明
-i, --input 入力 CSV または Excel (.xlsx) ファイル(必須)
-o, --output 出力 PNG ファイル(必須)
-x, --x-field X 軸フィールドまたは式(既定: x
-y, --y-field Y 軸フィールドまたは式(既定: y
--x-range X 軸範囲(min,max
--y-range Y 軸範囲(min,max
-g, --group グループ化フィールド
-f, --filter フィルタ(column=value、複数指定で AND)
-n, --name Excel の定義名またはテーブル名
-l, --label 各点に表示するラベル列

# グループ化とラベル表示
pycsv2chart -i data.csv -o chart.png -g category -l name

# フィルタと軸範囲
pycsv2chart -i data.csv -o chart.png -f status=active -f region=JP --x-range 0,100 --y-range 0,50

# 式で軸を指定
pycsv2chart -i data.csv -o chart.png -x "value_a + value_b" -y "value_c / value_d"

# Excel(定義名指定)
pycsv2chart -i data.xlsx -n MyTable -o chart.png

開発

uv sync --extra dev
MPLBACKEND=Agg uv run pytest tests/ -v

ビルドと公開手順は doc/build_and_release.md を参照してください。

ライセンス

MIT License。全文は LICENSE を参照してください。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycsv2chart-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycsv2chart-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file pycsv2chart-0.1.0.tar.gz.

File metadata

  • Download URL: pycsv2chart-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pycsv2chart-0.1.0.tar.gz
Algorithm Hash digest
SHA256 28120b1a9ce9975bade2b7fd5307aa36a99e27a70d747ca712b4c9233e3a646c
MD5 a9a088558baec5abd5b287ead5662f68
BLAKE2b-256 882b742e201ae8546d860fee6fc568161a5a1619d41a1eea79dbf9c8d8d247ac

See more details on using hashes here.

File details

Details for the file pycsv2chart-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pycsv2chart-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pycsv2chart-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d1f1e17ae46fe33346bf7b87465a0c463f31aedab1f8ad15cff053656b9106a
MD5 4fd9e05e2994ce473b0e85e1c3debdca
BLAKE2b-256 0a48d45cf3d42d712ed50f7e839fe7498ab2ffdfe535fe858751173de2914231

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page