webmaster-kazu.com

テクノロジー・データ分析・実践ログ・その他

【Python】pandas DataFrameから時系列データを視覚化する「vpselector」のインストール

カテゴリ: Python【初歩から現場実務的なもの】

Pythonで作られたpandas DataFrameから時系列データを視覚化するツール「vpselector」のインストールについて解説しています。

「vpselector(https://github.com/manumerous/vpselector)」は、pandas データフレームから数値時系列データの一部を視覚的に選択するPythonを用いて作られたツールです。

■Python

今回のPythonのバージョンは、「3.10.9」を使用しています。(Windows11)(pythonランチャーでの確認)

■vpselectorをインストールする

vpselectorをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install vpselector

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.10.9にインストールを行うために、バージョンの切り替えを行います。

py -3.10 -m pip install vpselector

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Defaulting to user installation because normal site-packages is not writeable

Collecting vpselector

Downloading vpselector-1.0.2-py3-none-any.whl (12 kB)

Collecting pandas>=1.1.5

Downloading pandas-2.1.1-cp310-cp310-win_amd64.whl (10.7 MB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.7/10.7 MB 3.9 MB/s eta 0:00:00

Collecting seaborn>=0.11.1

Using cached seaborn-0.12.2-py3-none-any.whl (293 kB)

Collecting overrides>=7.3.1

Using cached overrides-7.4.0-py3-none-any.whl (17 kB)

Collecting matplotlib>=3.7.1

Downloading matplotlib-3.8.0-cp310-cp310-win_amd64.whl (7.6 MB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.6/7.6 MB 4.0 MB/s eta 0:00:00

Collecting twine>=4.0.2

Downloading twine-4.0.2-py3-none-any.whl (36 kB)

Collecting PyQt5>=5.15.0

Downloading PyQt5-5.15.9-cp37-abi3-win_amd64.whl (6.8 MB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.8/6.8 MB 4.6 MB/s eta 0:00:00

Collecting packaging>=20.0

Using cached packaging-23.1-py3-none-any.whl (48 kB)

Collecting numpy<2,>=1.21

Downloading numpy-1.26.0-cp310-cp310-win_amd64.whl (15.8 MB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.8/15.8 MB 5.2 MB/s eta 0:00:00

Collecting kiwisolver>=1.0.1

Downloading kiwisolver-1.4.5-cp310-cp310-win_amd64.whl (56 kB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.1/56.1 kB ? eta 0:00:00

Collecting contourpy>=1.0.1

Downloading contourpy-1.1.1-cp310-cp310-win_amd64.whl (477 kB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 478.0/478.0 kB 2.7 MB/s eta 0:00:00

Collecting cycler>=0.10

Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)

Collecting pyparsing>=2.3.1

Using cached pyparsing-3.1.1-py3-none-any.whl (103 kB)

Collecting pillow>=6.2.0

Downloading Pillow-10.0.1-cp310-cp310-win_amd64.whl (2.5 MB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 6.2 MB/s eta 0:00:00

Collecting fonttools>=4.22.0

Downloading fonttools-4.42.1-cp310-cp310-win_amd64.whl (2.1 MB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 4.1 MB/s eta 0:00:00

Requirement already satisfied: python-dateutil>=2.7 in c:\users\user_\appdata\roaming\python\python310\site-packages (from matplotlib>=3.7.1->vpselector) (2.8.2)

Collecting tzdata>=2022.1

Using cached tzdata-2023.3-py2.py3-none-any.whl (341 kB)

Collecting pytz>=2020.1

Using cached pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)

Collecting PyQt5-Qt5>=5.15.2

Downloading PyQt5_Qt5-5.15.2-py3-none-win_amd64.whl (50.1 MB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.1/50.1 MB 4.8 MB/s eta 0:00:00

Collecting PyQt5-sip<13,>=12.11

Downloading PyQt5_sip-12.12.2-cp310-cp310-win_amd64.whl (78 kB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.4/78.4 kB 4.5 MB/s eta 0:00:00

Collecting keyring>=15.1

Downloading keyring-24.2.0-py3-none-any.whl (37 kB)

Collecting pkginfo>=1.8.1

Downloading pkginfo-1.9.6-py3-none-any.whl (30 kB)

Collecting requests-toolbelt!=0.9.0,>=0.8.0

Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB 2.8 MB/s eta 0:00:00

Collecting rich>=12.0.0

Downloading rich-13.5.3-py3-none-any.whl (239 kB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 239.8/239.8 kB 4.9 MB/s eta 0:00:00

Collecting importlib-metadata>=3.6

Using cached importlib_metadata-6.8.0-py3-none-any.whl (22 kB)

Requirement already satisfied: urllib3>=1.26.0 in c:\program files\python310\lib\site-packages (from twine>=4.0.2->vpselector) (2.0.3)

Collecting rfc3986>=1.4.0

Downloading rfc3986-2.0.0-py2.py3-none-any.whl (31 kB)

Collecting requests>=2.20

Using cached requests-2.31.0-py3-none-any.whl (62 kB)

Collecting readme-renderer>=35.0

Downloading readme_renderer-42.0-py3-none-any.whl (13 kB)

Collecting zipp>=0.5

Using cached zipp-3.17.0-py3-none-any.whl (7.4 kB)

Collecting jaraco.classes

Downloading jaraco.classes-3.3.0-py3-none-any.whl (5.9 kB)

Collecting pywin32-ctypes>=0.2.0

Downloading pywin32_ctypes-0.2.2-py3-none-any.whl (30 kB)

Requirement already satisfied: six>=1.5 in c:\users\user_\appdata\roaming\python\python310\site-packages (from python-dateutil>=2.7->matplotlib>=3.7.1->vpselector) (1.16.0)

Collecting docutils>=0.13.1

Downloading docutils-0.20.1-py3-none-any.whl (572 kB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 572.7/572.7 kB 6.0 MB/s eta 0:00:00

Collecting nh3>=0.2.14

Downloading nh3-0.2.14-cp37-abi3-win_amd64.whl (574 kB)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 574.0/574.0 kB 5.1 MB/s eta 0:00:00

Collecting Pygments>=2.5.1

Using cached Pygments-2.16.1-py3-none-any.whl (1.2 MB)

Requirement already satisfied: certifi>=2017.4.17 in c:\users\user_\appdata\roaming\python\python310\site-packages (from requests>=2.20->twine>=4.0.2->vpselector) (2023.7.22)

Collecting charset-normalizer<4,>=2

Using cached charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl (96 kB)

Requirement already satisfied: idna<4,>=2.5 in c:\users\user_\appdata\roaming\python\python310\site-packages (from requests>=2.20->twine>=4.0.2->vpselector) (3.4)

Collecting markdown-it-py>=2.2.0

Using cached markdown_it_py-3.0.0-py3-none-any.whl (87 kB)

Collecting mdurl~=0.1

Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)

Collecting more-itertools

Using cached more_itertools-10.1.0-py3-none-any.whl (55 kB)

Installing collected packages: pytz, PyQt5-Qt5, nh3, zipp, tzdata, rfc3986, pywin32-ctypes, PyQt5-sip, pyparsing, Pygments, pkginfo, pillow, packaging, overrides, numpy, more-itertools, mdurl, kiwisolver, fonttools, docutils, cycler, charset-normalizer, requests, readme-renderer, PyQt5, pandas, markdown-it-py, jaraco.classes, importlib-metadata, contourpy, rich, requests-toolbelt, matplotlib, keyring, twine, seaborn, vpselector

WARNING: The script pygmentize.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script pkginfo.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script f2py.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The scripts fonttools.exe, pyftmerge.exe, pyftsubset.exe and ttx.exe are installed in 'C:\Users\user_\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script docutils.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script normalizer.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The scripts pylupdate5.exe, pyrcc5.exe and pyuic5.exe are installed in 'C:\Users\user_\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script markdown-it.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script keyring.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script twine.exe is installed in 'C:\Users\user_\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Successfully installed PyQt5-5.15.9 PyQt5-Qt5-5.15.2 PyQt5-sip-12.12.2 Pygments-2.16.1 charset-normalizer-3.2.0 contourpy-1.1.1 cycler-0.11.0 docutils-0.20.1 fonttools-4.42.1 importlib-metadata-6.8.0 jaraco.classes-3.3.0 keyring-24.2.0 kiwisolver-1.4.5 markdown-it-py-3.0.0 matplotlib-3.8.0 mdurl-0.1.2 more-itertools-10.1.0 nh3-0.2.14 numpy-1.26.0 overrides-7.4.0 packaging-23.1 pandas-2.1.1 pillow-10.0.1 pkginfo-1.9.6 pyparsing-3.1.1 pytz-2023.3.post1 pywin32-ctypes-0.2.2 readme-renderer-42.0 requests-2.31.0 requests-toolbelt-1.0.0 rfc3986-2.0.0 rich-13.5.3 seaborn-0.12.2 twine-4.0.2 tzdata-2023.3 vpselector-1.0.2 zipp-3.17.0

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、vpselectorが正常にインストールされたことになりますが、「WARNING」と表示されました。「WARNING」はエラーではなく警告で、インストールは行われているので、今回は一旦無視しています。

なお、今回はvpselectorのバージョン1.0.2をインストールしました。