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を使ったデータ分析、機械学習
116
3
章 
pandas
を使ったデータ操作
pandas
オブジェクトになります。
In[4]: np.exp(ser)
Out[4]: 0 403.428793
1 20.085537
2 1096.633158
3 54.598150
dtype: float64
より複雑な計算でも同様です。
In[5]: np.sin(df * np.pi / 4)
Out[5]: A B C D
0 -1.000000 7.071068e-01 1.000000 -1.000000e+00
1 -0.707107 1.224647e-16 0.707107 -7.071068e-01
2 -0.707107 1.000000e+0
0 -0.707107 1.224647e-16
「2.3 NumPy 配列の計算:ユニバーサル関数」で紹介したすべての
ufunc
を同じように使用でき
ます。
3.4.2
ufunc
:インデクスの整列
2
つの
Series
オブジェクトまたは
DataFrame
オブジェクトに対する二項演算の場合、
pandas
は操
作を実行する過程でインデクスを整列させます。これは、不完全なデータを扱っているときに非常
に便利な機能です。これについては、いくつかの例を通して説明します。
3.4.2.1
Series
オブジェクトのインデクス整列
例として
2
つの異なるデータソースを結合し、米国の面積上位
3
つの州と、人口上位
3
つの州を
検索するとします。
In[6]: area = pd.Series({'Alaska': ...
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