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を使ったデータ分析、機械学習
330
4
章 
Matplotlib
による可視化
図4-129 性別によるスプリット率の分布
ここで興味深いのは、女性よりも男性の方が均等な走り方をしている割合が多いということで
す。これは男性と女性の間で、ある種の二峰性分布のように見えます。年齢の関数として分布を見
ることによって何が起こっているのかを見てみましょう。
分布の比較には、バイオリンプロットが使えます( 4-130)。
In[34]:
sns.violinplot("gender", "split_frac", data=data,
palette=["lightblue", "lightpink"]);
図4-130 バイオリンプロットによる男女別のスプリット率
4.16
Seaborn
による可視化
331
男性と女性の分布を比較するには、このような方法もあります。このバイオリンプロットを年齢
の関数として詳しく比較してみましょう。最初に、ランナーの
10
歳ごとの年齢を指定する新しい
列を作成します( 4-131)。
In[35]: data['age_dec'] = data.age.map(lambda age: 10 * (age // 10))
data.head()
Out[35]:
age gender split final split_sec ...
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