OReilly Python for Data Analysis (2013).pdf

(14442 KB) Pobierz
994565434.008.png
Python for Data Analysis
Wes McKinney
Beijing
Cambridge
Farnham
Köln
Sebastopol
Tokyo
994565434.009.png 994565434.010.png 994565434.011.png 994565434.001.png 994565434.002.png 994565434.003.png 994565434.004.png 994565434.005.png
 
Python for Data Analysis
by Wes McKinney
Copyright © 2013 Wes McKinney. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles ( http://my.safaribooksonline.com ) . For more information, contact our
corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .
Editors: Julie Steele and Meghan Blanchette
Production Editor: Melanie Yarbrough
Copyeditor: Teresa Exley
Proofreader: BIM Publishing Services
Indexer: BIM Publishing Services
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrator: Rebecca Demarest
October 2012:
First Edition.
Revision History for the First Edition:
2012-10-05 First release
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. Python for Data Analysis , the cover image of a golden-tailed tree shrew, and related
trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a
trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and author assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
ISBN: 978-1-449-31979-3
[LSI]
1349356084
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
1.
Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What Is This Book About?
1
Why Python for Data Analysis?
2
Python as Glue
2
Solving the “Two-Language” Problem
2
Why Not Python?
3
Essential Python Libraries
3
NumPy
4
pandas
4
matplotlib
5
IPython
5
SciPy
6
Installation and Setup
6
Windows
7
Apple OS X
9
GNU/Linux
10
Python 2 and Python 3
11
Integrated Development Environments (IDEs)
11
Community and Conferences
12
Navigating This Book
12
Code Examples
13
Data for Examples
13
Import Conventions
13
Jargon
13
Acknowledgements
14
2.
Introductory Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.usa.gov data from bit.ly
17
Counting Time Zones in Pure Python
19
iii
994565434.006.png 994565434.007.png
Zgłoś jeśli naruszono regulamin