Preface 1. Preliminaries What Is This Book About? Why Python for Data Analysis? Python as Glue Solving the "Two-Language" Problem Why Not Python? Essential Python Libraries NumPy pandas matplotlib IPython SciPy Installation and Setup Windows Apple OS X GNU/Linux Python 2 and Python 3 Integrated Development Environments (IDEs) Community and Conferences Navigating This Book Code Examples Data for Examples Import Conventions Jargon Acknowledgements 2. Introductory Examples 1.usa.gov data from bit.ly Counting Time Zones in Pure Python Counting Time Zones with pandas MovieLens 1M Data Set Measuring rating disagreement US Baby Names 1880-2010 Analyzing Naming Trends Conclusions and The Path Ahead 3. IPython: An Interactive Computing and Development Environment IPython Basics Tab Completion Introspection The %run Command Executing Code from the Clipboard Keyboard Shortcuts Exceptions and Tracebacks Magic Commands Qt-based Rich GUI Console Matplotlib Integration and Pylab Mode Using the Command History Searching and Reusing the Command History Input and Output Variables Logging the Input and Output Interacting with the Operating System Shell Commands and Aliases Directory Bookmark System Software Development Tools Interactive Debugger Timing Code: %time and %timeit Basic Profiling: %prun and %run-p Profiling a Function Line-by-Line IPython HTML Notebook Tips for Productive Code Development Using IPython Reloading Module Dependencies Code Design Tips Advanced IPython Features Making Your Own Classes IPython-friendly Profiles and Configuration Credits 4. NumPy Basics: Arrays and Vectorized Computation The NumPy ndarray: A Multidimensional Array Object Creating ndarrays Data Types for ndarrays …… 5.Gettinq Started with pandas 6.Data Loading,Storage,and File Formats 7.Data Wrangling:Clean t Transform l Merge t Reshape 8.Plotting and Visualization. 9.Data Aggregation and Group Operations 10.Time Series 11.Financial and Economic Data Applications 12.Advanced NumPy Appendix:Python Language Essentials Index