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

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

by Jake VanderPlas, 菊池 彰
February 2024
Intermediate to advanced
576 pages
9h 17m
Japanese
O'Reilly Japan, Inc.
Content preview from Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

32章テキストと注釈

優れた可視化では、図がストーリーを持ち、読み手を誘導します。こうしたストーリーはテキストを追加することなく視覚だけで伝えることも可能ですが、場合によってはちょっとしたテキストやラベルなどの手がかりが必要です。おそらく、最も基本的な注釈は軸ラベルとタイトルですが、それ以外にもさまざまな選択肢があります。いくつかのデータを可視化し、注釈を付け、興味深い情報を伝える方法を説明します。まず、Jupyter Notebookの設定と、使用するモジュールのインポートを行います。

In [1]: %matplotlib inline
        import matplotlib.pyplot as plt
        import matplotlib as mpl
        plt.style.use('seaborn-whitegrid')
        import numpy as np
        import pandas as pd

32.1 事例:米国出生率における休日の影響

「21.4 事例:出生率データ」で1年間の平均出生数をグラフにしたデータに戻りましょう。その際に行ったようにデータを整形して、結果をプロットします(図32-1を参照)。

In [2]: # データをダウンロードするための、シェルコマンド # !cd data && curl -O \ # https://raw.githubusercontent.com/jakevdp/data-CDCbirths/master/ # births.csv In [3]: from datetime import datetime births = pd.read_csv('data/births.csv') quartiles = np.percentile(births['births'], ...
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データサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

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

Jake VanderPlas, 菊池 彰
推薦システム実践入門 ―仕事で使える導入ガイド

推薦システム実践入門 ―仕事で使える導入ガイド

風間 正弘, 飯塚 洸二郎, 松村 優也
プロダクトマネージャーのしごと 第2版 ―1日目から使える実践ガイド

プロダクトマネージャーのしごと 第2版 ―1日目から使える実践ガイド

Matt LeMay, 永瀬 美穂, 吉羽 龍太郎, 原田 騎郎, 高橋 一貴

Publisher Resources

ISBN: 9784814400638Publisher Website