Skip to Content
Python2年生 データ分析のしくみ 第2版 体験してわかる!会話でまなべる!
book

Python2年生 データ分析のしくみ 第2版 体験してわかる!会話でまなべる!

by 森 巧尚
June 2024
Intermediate to advanced
200 pages
4h 46m
Japanese
Shōeisha
Content preview from Python2年生 データ分析のしくみ 第2版 体験してわかる!会話でまなべる!
83
データを平らに均(なら)す
LESSON
08
Aクラス = 85.0
B
クラス = 80.0
それぞれが、1つの数値で表現されるので、わかりやすくなりました。
この結果を見ると、「
Aクラスは全体として85点、Bクラスは全体として80点なんだなあ」
とわかります。
Aクラス Bクラス
0 82 100
1 89 62
2 93 82
3 85 70
4 76 86
85.0 80.0
df["A
クラス"].mean() df["Bクラス"].mean()
代表値は 、「 デ ー タ の 比較」に使う
このようにして求めた代表値は、「データの比較」に使います。
代表値は
1つの値なので、1つだけでは「何を意味するのか」は、よくわかりません。「他
の値と比較」することで初めて意味が見えてきます。
例えば、「代表値と、代表値を比較」すると
「グループとグループの差」がわかります。
「
Aクラスと、Bクラスの差」がわかるのです。
「
Aクラス」と「Bクラス」の平均値をもう一度表示させてみましょう。今度は、別の方
法で表示させてみましょう(リスト
3.3)。データフレーム自体に命令します。すると、デー
タフレームの中の各列の平均値が表示されます。
出力結果
A
クラスと
B
クラスの
平均が、パッと見てわ
かるようになったね。
Chapter
3
84
•
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python2年生 スクレイピングのしくみ 第2版 体験してわかる!会話でまなべる!

Python2年生 スクレイピングのしくみ 第2版 体験してわかる!会話でまなべる!

森 巧尚

Publisher Resources

ISBN: 9784798183657