Book description
Learn to use IPython and Jupyter Notebook for your data analysis and visualization work.
About This Book
 Leverage the Jupyter Notebook for interactive data science and visualization
 Become an expert in highperformance computing and visualization for data analysis and scientific modeling
 A comprehensive coverage of scientific computing through many handson, exampledriven recipes with detailed, stepbystep explanations
Who This Book Is For
This book is intended for anyone interested in numerical computing and data science: students, researchers, teachers, engineers, analysts, and hobbyists. A basic knowledge of Python/NumPy is recommended. Some skills in mathematics will help you understand the theory behind the computational methods.
What You Will Learn
 Master all features of the Jupyter Notebook
 Code better: write highquality, readable, and welltested programs; profile and optimize your code; and conduct reproducible interactive computing experiments
 Visualize data and create interactive plots in the Jupyter Notebook
 Write blazingly fast Python programs with NumPy, ctypes, Numba, Cython, OpenMP, GPU programming (CUDA), parallel IPython, Dask, and more
 Analyze data with Bayesian or frequentist statistics (Pandas, PyMC, and R), and learn from actual data through machine learning (scikitlearn)
 Gain valuable insights into signals, images, and sounds with SciPy, scikitimage, and OpenCV
 Simulate deterministic and stochastic dynamical systems in Python
 Familiarize yourself with math in Python using SymPy and Sage: algebra, analysis, logic, graphs, geometry, and probability theory
In Detail
Python is one of the leading open source platforms for data science and numerical computing. IPython and the associated Jupyter Notebook offer efficient interfaces to Python for data analysis and interactive visualization, and they constitute an ideal gateway to the platform.
IPython Interactive Computing and Visualization Cookbook, Second Edition contains many readytouse, focused recipes for highperformance scientific computing and data analysis, from the latest IPython/Jupyter features to the most advanced tricks, to help you write better and faster code. You will apply these stateoftheart methods to various realworld examples, illustrating topics in applied mathematics, scientific modeling, and machine learning.
The first part of the book covers programming techniques: code quality and reproducibility, code optimization, highperformance computing through justintime compilation, parallel computing, and graphics card programming. The second part tackles data science, statistics, machine learning, signal and image processing, dynamical systems, and pure and applied mathematics.
Style and approach
IPython Interactive Computing and Visualization Cookbook, Second Edition is a practical, handson book that will teach you how to analyze and visualize all kinds of data in the Jupyter Notebook.
Table of contents

IPython Interactive Computing and Visualization Cookbook Second Edition
 Table of Contents
 IPython Interactive Computing and Visualization CookbookSecond Edition
 Contributors
 Preface

1. A Tour of Interactive Computing with Jupyter and IPython
 Introduction
 Introducing IPython and the Jupyter Notebook
 Getting started with exploratory data analysis in the Jupyter Notebook
 Introducing the multidimensional array in NumPy for fast array computations
 Creating an IPython extension with custom magic commands
 Mastering IPython's configuration system
 Creating a simple kernel for Jupyter

2. Best Practices in Interactive Computing
 Introduction
 Learning the basics of the Unix shell
 Using the latest features of Python 3
 Learning the basics of the distributed version control system Git
 A typical workflow with Git branching
 Efficient interactive computing workflows with IPython
 Ten tips for conducting reproducible interactive computing experiments
 Writing highquality Python code
 Writing unit tests with pytest
 Debugging code with IPython

3. Mastering the Jupyter Notebook
 Introduction
 Teaching programming in the Notebook with IPython Blocks
 Converting a Jupyter notebook to other formats with nbconvert
 Mastering widgets in the Jupyter Notebook
 Creating custom Jupyter Notebook widgets in Python, HTML, and JavaScript
 Configuring the Jupyter Notebook
 Introducing JupyterLab

4. Profiling and Optimization
 Introduction
 Evaluating the time taken by a command in IPython
 Profiling your code easily with cProfile and IPython
 Profiling your code linebyline with line_profiler
 Profiling the memory usage of your code with memory_profiler
 Understanding the internals of NumPy to avoid unnecessary array copying
 Using stride tricks with NumPy
 Implementing an efficient rolling average algorithm with stride tricks
 Processing large NumPy arrays with memory mapping
 Manipulating large arrays with HDF5

5. HighPerformance Computing
 Introduction
 Using Python to write faster code
 Accelerating pure Python code with Numba and JustInTime compilation
 Accelerating array computations with NumExpr
 Wrapping a C library in Python with ctypes
 Accelerating Python code with Cython
 Optimizing Cython code by writing less Python and more C
 Releasing the GIL to take advantage of multicore processors with Cython and OpenMP
 Writing massively parallel code for NVIDIA graphics cards (GPUs) with CUDA
 Distributing Python code across multiple cores with IPython
 Interacting with asynchronous parallel tasks in IPython
 Performing outofcore computations on large arrays with Dask
 Trying the Julia programming language in the Jupyter Notebook

6. Data Visualization
 Introduction
 Using Matplotlib styles
 Creating statistical plots easily with seaborn
 Creating interactive web visualizations with Bokeh and HoloViews
 Visualizing a NetworkX graph in the Notebook with D3.js
 Discovering interactive visualization libraries in the Notebook
 Creating plots with Altair and the VegaLite specification

7. Statistical Data Analysis
 Introduction
 Exploring a dataset with pandas and Matplotlib
 Getting started with statistical hypothesis testing — a simple ztest
 Getting started with Bayesian methods
 Estimating the correlation between two variables with a contingency table and a chisquared test
 Fitting a probability distribution to data with the maximum likelihood method
 Estimating a probability distribution nonparametrically with a kernel density estimation
 Fitting a Bayesian model by sampling from a posterior distribution with a Markov chain Monte Carlo method
 Analyzing data with the R programming language in the Jupyter Notebook

8. Machine Learning
 Introduction
 Getting started with scikitlearn
 Predicting who will survive on the Titanic with logistic regression
 Learning to recognize handwritten digits with a Knearest neighbors classifier
 Learning from text – Naive Bayes for Natural Language Processing
 Using support vector machines for classification tasks
 Using a random forest to select important features for regression
 Reducing the dimensionality of a dataset with a principal component analysis
 Detecting hidden structures in a dataset with clustering
 9. Numerical Optimization
 10. Signal Processing
 11. Image and Audio Processing
 12. Deterministic Dynamical Systems
 13. Stochastic Dynamical Systems

14. Graphs, Geometry, and Geographic Information Systems
 Introduction
 Manipulating and visualizing graphs with NetworkX
 Drawing flight routes with NetworkX
 Resolving dependencies in a directed acyclic graph with a topological sort
 Computing connected components in an image
 Computing the Voronoi diagram of a set of points
 Manipulating geospatial data with Cartopy
 Creating a route planner for a road network

15. Symbolic and Numerical Mathematics
 Introduction
 Diving into symbolic computing with SymPy
 Solving equations and inequalities
 Analyzing realvalued functions
 Computing exact probabilities and manipulating random variables
 A bit of number theory with SymPy
 Finding a Boolean propositional formula from a truth table
 Analyzing a nonlinear differential system — LotkaVolterra (predatorprey) equations
 Getting started with Sage
 Index
Product information
 Title: IPython Interactive Computing and Visualization Cookbook  Second Edition
 Author(s):
 Release date: January 2018
 Publisher(s): Packt Publishing
 ISBN: 9781785888632
You might also like
book
Scientific Computing with Python  Second Edition
Leverage this examplepacked, comprehensive guide for all your Python computational needs Key Features Learn the first …
book
Python Machine Learning Cookbook  Second Edition
Discover powerful ways to effectively solve realworld machine learning problems using key libraries including scikitlearn, TensorFlow, …
book
Interactive Data Visualization with Python  Second Edition
Create your own clear and impactful interactive data visualizations with the powerful data visualization libraries of …
book
Scientific Computing with Python 3
An examplerich, comprehensive guide for all of your Python computational needs About This Book Your ultimate …