Skip to Content
Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習
book

Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

by Jake VanderPlas, 菊池 彰
May 2018
Intermediate to advanced
556 pages
13h 21m
Japanese
O'Reilly Japan, Inc.
Content preview from Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習
14
1
章 
IPython
Python
より優れた
Python
1.5.1
IPython
In
オブジェクトと
Out
オブジェクト
もう既に
IPython
の使う
In[1]:/Out[1]:
スタイルのプロンプトには慣れたことと思います。しか
しこれが単なる飾りではないことをこれから示しましょう。これは現在のセッションでこれまでに
行われた入力と出力へアクセスするための手がかりなのです。次のような処理を行っていたとしま
しょう。
In [1]: import math
In [2]: math.sin(2)
Out[2]: 0.9092974268256817
In [3]: math.cos(2)
Out[3]: -0.4161468365471424
組み込みの
math
パッケージをインポートし、
2
(単位はラジアン)に対する正弦と余弦を計算し
ました。これらの入力と出力は
In
/
Out
ラベル付きでシェルに表示されますが、実はもっと多くの
ことが行われています。
IPython
In
Out
変数を作成し、履歴が反映されるようにこれらの変数
を自動的に更新します。
In [4]: print(In)
['', 'import math', 'math.sin(2)', 'math.cos(2)', 'print(In)']
In [5]: Out
Out[5]: {2: 0.9092974268256817, 3: -0.4161468365471424}
In
オブジェクトは、入力したコマンドを順番に記録したリストです(最
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Jake VanderPlas, 菊池 彰
初めてのGraphQL ―Webサービスを作って学ぶ新世代API

初めてのGraphQL ―Webサービスを作って学ぶ新世代API

Eve Porcello, Alex Banks, 尾崎 沙耶, あんどうやすし

Publisher Resources

ISBN: 9784873118413Other