差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
python:numpy_scipy_matplotlib [2019/08/07 20:24] – [使い方] ともやん | python:numpy_scipy_matplotlib [2020/04/16 03:38] (現在) – ともやん | ||
---|---|---|---|
行 1: | 行 1: | ||
- | <ifauth !@loggedinusers> | + | < |
- | <script async src="// | + | <style> |
- | < | + | # |
- | | + | |
- | | + | overflow: scroll; |
- | | + | overflow-x: hidden; |
- | | + | } |
- | </script></ | + | #logo_numpy { |
+ | background-color: #a2bae8; | ||
+ | width: fit-content; | ||
+ | | ||
+ | | ||
+ | #logo_numpy p { | ||
+ | margin: 0; | ||
+ | } | ||
+ | | ||
+ | </ | ||
====== NumPy, SciPy, Matplotlib, CuPy, Pandas のインストール ====== | ====== NumPy, SciPy, Matplotlib, CuPy, Pandas のインストール ====== | ||
- | ===== NumPy, SciPy, Matplotlib, CuPy のインストール ===== | + | ====== NumPy, SciPy, Matplotlib, CuPy のインストール |
- | ==== Linux ==== | + | ===== Linux ===== |
< | < | ||
$ pip3 install numpy scipy matplotlib cupy | $ pip3 install numpy scipy matplotlib cupy | ||
</ | </ | ||
- | ==== Windows ==== | + | ===== Windows |
< | < | ||
> pip install numpy scipy matplotlib cupy | > pip install numpy scipy matplotlib cupy | ||
行 22: | 行 31: | ||
※CuPy をインストールするには [[windows: | ※CuPy をインストールするには [[windows: | ||
- | ==== NumPy ==== | + | ====== NumPy ====== |
- | {{: | + | <WRAP # |
+ | {{: | ||
+ | </ | ||
本家: [[https:// | 本家: [[https:// | ||
ソースコード: | ソースコード: | ||
行 34: | 行 45: | ||
[[https:// | [[https:// | ||
- | ==== SciPy ==== | + | ====== SciPy ====== |
[[https:// | [[https:// | ||
\\ | \\ | ||
行 40: | 行 51: | ||
[[https:// | [[https:// | ||
- | ==== Matplotlib ==== | + | ====== Matplotlib |
[[https:// | [[https:// | ||
\\ | \\ | ||
行 46: | 行 57: | ||
[[https:// | [[https:// | ||
- | ==== CuPy ==== | + | ====== CuPy ====== |
{{: | {{: | ||
本家: [[https:// | 本家: [[https:// | ||
行 58: | 行 69: | ||
[[https:// | [[https:// | ||
- | ===== Pandas のインストール ===== | + | ====== Pandas のインストール |
本家: [[https:// | 本家: [[https:// | ||
\\ | \\ | ||
**Pandas** は、プログラミング言語 Python において、データ解析を支援する機能を提供するライブラリである。特に、数表および時系列データを操作するためのデータ構造と演算を提供する。Pandas は BSD ライセンスのもとで提供されている。\\ | **Pandas** は、プログラミング言語 Python において、データ解析を支援する機能を提供するライブラリである。特に、数表および時系列データを操作するためのデータ構造と演算を提供する。Pandas は BSD ライセンスのもとで提供されている。\\ | ||
- | ==== Linux ==== | + | ===== Linux ===== |
< | < | ||
$ pip3 install pandas | $ pip3 install pandas | ||
</ | </ | ||
- | ==== Windows ==== | + | ===== Windows |
< | < | ||
> pip install pandas | > pip install pandas | ||
</ | </ | ||
- | <WRAP prewrap 100%> | + | <WRAP prewrap 100% #result> |
< | < | ||
Collecting pandas | Collecting pandas | ||
行 88: | 行 99: | ||
</ | </ | ||
- | ==== 使い方 ==== | + | ===== 使い方 |
- | === 行によって列数の異なる CSV を DataFrame 化する方法 === | + | ==== 行によって列数の異なる CSV を DataFrame 化する方法 ==== |
+ | <file csv data.csv> | ||
+ | col1 col2 col3 col4 col5 | ||
+ | 1 2 3 4 | ||
+ | 1 2 3 | ||
+ | 1 2 3 4 5 | ||
+ | </ | ||
<code python> | <code python> | ||
In [1]: import csv | In [1]: import csv | ||
行 124: | 行 141: | ||
</ | </ | ||
- | === データフレームのグループ化(集計) === | + | ==== データフレームのグループ化(集計) |
<WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
<code python> | <code python> |