Skip to Content
Pythonによるデータ分析入門 第2版 ―NumPy、pandasを使ったデータ処理
book

Pythonによるデータ分析入門 第2版 ―NumPy、pandasを使ったデータ処理

by Wes McKinney, 瀬戸山 雅人, 小林 儀匡, 滝口 開資
July 2018
Intermediate to advanced
596 pages
13h 35m
Japanese
O'Reilly Japan, Inc.
Content preview from Pythonによるデータ分析入門 第2版 ―NumPy、pandasを使ったデータ処理
A.2
 配列操作:応用編
493
order
引数を与えることができます。この引数に設定する値は、通常は
'C'
'F'
です(あまり使われな
いオプションとして
'A'
'K'
もあります。詳しくは
NumPy
のドキュメントを参照してください。また、
これらのオプションによる変化を、先ほどの図A-3で説明しています)。次の例では、
ravel
の処理順序
を変えた結果を比較しています。
In [31]: arr = np.arange(12).reshape((3, 4))
In [32]: arr
Out[32]:
array([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11]])
In [33]: arr.ravel()
Out[33]: array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
)
In [34]: arr.ravel('F')
Out[34]: array([ 0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11])
2
次元より高い次元の配列の再成形は、多少難解に感じるかもしれません(図A-3を参照)。
C
型順序
Fortran
型順序の違いのポイントは、どの次元を先に走査するのか、という点です。
C型、つまり行優先の順序
より高い次元を先にトラバースする(例えば、第
0
軸の処理に進む前に第
1
軸を処理する)。
Fortran型、つまり列優先の順序
より高い次元を後にトラバースする(例えば、第
1
軸の処理に進む前に第
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

行動を変えるデザイン ―心理学と行動経済学をプロダクトデザインに活用する

行動を変えるデザイン ―心理学と行動経済学をプロダクトデザインに活用する

Stephen Wendel, 武山 政直, 相島 雅樹, 反中 望, 松村 草也
詳解 システム・パフォーマンス 第2版

詳解 システム・パフォーマンス 第2版

Brendan Gregg, 西脇 靖紘, 長尾 高弘
詳説 イーサネット 第2版

詳説 イーサネット 第2版

Charles E. Spurgeon, Joann Zimmerman, 三浦 史光, 豊沢 聡
プログラミングRust 第2版

プログラミングRust 第2版

Jim Blandy, Jason Orendorff, Leonora F. S. Tindall, 中田 秀基

Publisher Resources

ISBN: 9784873118451Other