万本电子书0元读

万本电子书0元读

顶部广告

SciPy Recipes电子书

售       价:¥

5人正在读 | 0人评论 9.8

作       者:L. Felipe Martins,Ruben Oliva Ramos,V Kishore Ayyadevara

出  版  社:Packt Publishing

出版时间:2017-12-20

字       数:38.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Tackle the most sophisticated problems associated with scientific computing and data manipulation using SciPy About This Book ? Covers a wide range of data science tasks using SciPy, NumPy, pandas, and matplotlib ? Effective recipes on advanced scientific computations, statistics, data wrangling, data visualization, and more ? A must-have book if you're looking to solve your data-related problems using SciPy, on-the-go Who This Book Is For Python developers, aspiring data scientists, and analysts who want to get started with scientific computing using Python will find this book an indispensable resource. If you want to learn how to manipulate and visualize your data using the SciPy Stack, this book will also help you. A basic understanding of Python programming is all you need to get started. What You Will Learn ? Get a solid foundation in scientific computing using Python ? Master common tasks related to SciPy and associated libraries such as NumPy, pandas, and matplotlib ? Perform mathematical operations such as linear algebra and work with the statistical and probability functions in SciPy ? Master advanced computing such as Discrete Fourier Transform and K-means with the SciPy Stack ? Implement data wrangling tasks efficiently using pandas ? Visualize your data through various graphs and charts using matplotlib In Detail With the SciPy Stack, you get the power to effectively process, manipulate, and visualize your data using the popular Python language. Utilizing SciPy correctly can sometimes be a very tricky proposition. This book provides the right techniques so you can use SciPy to perform different data science tasks with ease. This book includes hands-on recipes for using the different components of the SciPy Stack such as NumPy, SciPy, matplotlib, and pandas, among others. You will use these libraries to solve real-world problems in linear algebra, numerical analysis, data visualization, and much more. The recipes included in the book will ensure you get a practical understanding not only of how a particular feature in SciPy Stack works, but also of its application to real-world problems. The independent nature of the recipes also ensure that you can pick up any one and learn about a particular feature of SciPy without reading through the other recipes, thus making the book a very handy and useful guide. Style and approach This book consists of hands-on recipes where you’ll deal with real-world problems. You’ll execute a series of tasks as you walk through scientific computing challenges using SciPy. Your one-stop solution for common and not-so-common pain points, this is a book that you must have on the shelf.
目录展开

Title Page

Copyright

SciPy Recipes

Credits

About the Authors

About the Reviewer

www.PacktPub.com

Why subscribe?

Customer Feedback

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

Getting to Know the Tools

Introduction

Installing Anaconda on Windows

How to do it...

Installing Anaconda on macOS

How to do it...

Installing Anaconda on Linux

How to do it...

Checking the Anaconda installation

How to do it...

Installing SciPy from a binary distribution on Windows

How to do it...

Installing Python

Installing the SciPy stack

Installing SciPy from a binary distribution on macOS

How to do it...

Installing the Xcode command-line tools

Installing Homebrew

Installing Python 3

Installing the SciPy stack

Installing SciPy from source on Linux

How to do it...

Installing Python 3

Installing the SciPy stack

Installing optional packages with conda

Getting ready

How to do it...

Installing packages with pip

How to do it...

Setting up a virtual environment with conda

Getting ready

How to do it...

Creating a virtual environment for development with conda

Getting ready

How to do it...

Creating a conda environment with a different version of a package

Getting ready

How to do it...

Using conda environments to run different versions of Python

Getting ready

How to do it...

Creating virtual environments with venv

How to do it...

Running SciPy in a script

Getting ready

How to do it...

Running SciPy in Jupyter

Getting ready

How to do it...

Running SciPy in Spyder

Getting ready

How to do it...

Running SciPy in PyCharm

Getting started

How to do it...

Getting Started with NumPy

Introduction

Creating NumPy arrays

How to do it…

Creating an array from a list

Specifying the data type for elements in an array

Creating an empty array with a given shape

Creating arrays of zeros and ones with a single value

Creating arrays with equally spaced values

Creating an array by repeating elements

Creating an array by tiling another array

Creating an array with the same shape as another array

Using object arrays to store heterogeneous data

See also

Querying and changing the shape of an array

How to do it...

Storing and retrieving NumPy arrays

How to do it...

Storing a NumPy array in text format

Storing a NumPy array in CSV format

Loading an array from a text file

Storing a single array in binary format

Storing several arrays in binary format

Loading arrays stored in NPY binary format

Indexing

How to do it...

Accessing sub arrays using slices

Selecting subarrays using an index list

Indexing with Boolean arrays

Operations on arrays

How to do it...

Computing a function for all elements of an array

Doing array operations

Computing matrix products

Using masked arrays to represent invalid data

How to do it...

Creating a masked array from an explicit mask

Creating a masked array from a condition

Using object arrays to store heterogeneous data

How to do it...

Defining, symbolically, a function operating on arrays

Getting ready

How to do it...

How it works...

Using Matplotlib to Create Graphs

Introduction

Creating two-dimensional plots of functions and data

Getting ready

How to do it…

How it works…

Generating multiple plots in a single figure

Getting ready

How to do it…

How it works…

Setting line styles and markers

Getting ready

How to do it…

How it works…

Using different backends to display graphs

Getting ready

How to do it…

How it works…

Saving plots to disk

Getting ready

How to do it…

How it works…

Annotating graphs

Getting ready

How to do it…

How it works…

Generating histograms and box plots

Getting ready

How to do it…

How it works…

Creating three-dimensional plots

Getting ready

How to do it…

How it works…

Generating interactive displays in the Jupyter Notebook

Getting ready

How to do it…

How it works…

Object-oriented graph creation using Artist objects

Getting ready

How to do it…

How it works…

Creating a map with cartopy

Getting ready

How to do it…

How it works…

Data Wrangling with pandas

Creating Series objects

Getting ready

How to do it...

How it works...

Creating DataFrame objects

Getting ready

How to do it...

How it works...

Inserting and deleting columns to a DataFrame

Getting ready

How to do it...

How it works...

Inserting and deleting rows to a DataFrame

Getting ready

How to do it...

How it works...

Selecting items by row indexes and column labels

Getting ready

How to do it...

How it works...

Selecting items by integer location

Getting ready

How to do it...

How it works...

Selecting items using mixed indexing

Getting ready

How to do it...

How it works...

Accessing, selecting, and modifying data

Getting ready

How to do it...

How it works...

Selecting rows using Boolean selection

How to do it...

Reading and storing data in different formats

Getting ready

How to do it...

Working with CSV, text/tabular, and format data

How it works...

Reading a CSV file into a DataFrame

Specifying the index column when reading a CSV file

Reading and writing data in Excel format

Reading and writing JSON files

Reading HTML data from the web

Accessing CSV data on the web

Reading and writing from/to SQL databases

Data displays employing different kinds of visual representation

Getting ready

How to do it...

How it works...

How to apply numerical functions and operations to Series and DataFrame objects

Getting ready

How to do it...

How it works...

Computing statistical functions on Series and DataFrame objects

Getting ready

How to do it...

Retrieving summary descriptive statistics

How it works...

Calculating the mean

Calculating variance and standard deviation

How to sort data in Series and DataFrame objects

Getting ready

How to do it...

How it works...

Performing merging, joins, concatenation, and grouping

Getting ready

How to do it...

How it works...

Merging data from multiple pandas objects

Matrices and Linear Algebra

Introduction

Matrix operations and functions on two-dimensional arrays

How to do it…

Solving linear systems using matrices

How it works…

How to do it…

Calculating the null space of a matrix

How to do it…

Calculating the LU decompositions of a matrix

How to do it…

Calculating the QR decomposition of a matrix

How to do it…

Calculating the eigenvalue and eigenvector of a matrix

How to do it…

Diagonalizing a matrix

How to do it…

Calculating the Jordan form of a matrix

How to do it…

Calculating the singular value decomposition of a matrix

How to do it…

Creating a sparse matrix

How to do it…

Computations on top of a sparse matrix

How to do it…

Solving Equations and Optimization

Introduction

Non-linear equations and systems

Getting ready

How to do it...

How it works...

System of equations and how to solve it

Getting ready

How to do it...

How it works...

Choosing the solver used to find the solution of equations

Getting ready

How to do it...

How it works...

Solving constrained non-linear optimization problems in several variables

Getting ready

How to do it...

How it works...

Solving one-dimensional optimization problems

Getting ready

How to do it...

How it works...

Solving multidimensional non-linear equations using the Newton-Krylov method

Getting ready

How to do it...

Solving multidimensional non-linear equations using the Anderson method

Getting ready

How to do it...

How it works...

Finding the best linear fit for a set of data

Getting ready

How to do it...

How it works ...

Doing non-linear regression for a set of data

Getting ready

How to do it...

How it works...

Regression

Getting ready

How to do it...

How it works...

Constants and Special Functions

Introduction

Physical and mathematical constants available in SciPy

Getting ready...

How to do it...

Using constants in the CODATA database

Getting ready

How to do it...

Bessel functions

Getting ready...

How to do it...

Error functions

Getting ready...

How to do it...

Orthogonal polynomials functions

Getting ready...

How to do it...

Gamma function

Getting ready...

How to do it...

How it works...

The Riemann zeta function

Getting ready

How to do it...

How it works...

Airy and Bairy functions

Getting ready...

How to do it...

The Bessel and Struve functions

Getting ready...

How to do it...

How it works...

There's more

Calculus, Interpolation, and Differential Equations

Introduction

Integration

Getting ready

How to do it…

How it works...

Computing integrals using the Newton-Cotes method

Computing integrals using a Gaussian quadrature

Getting ready

How to do it...

How it works...

Computing integrals with weighting functions

Getting ready

How to do it...

Computing multiple integrals

Getting ready

How to do it...

Interpolation

Getting ready

How to do it...

Computing a polynomial interpolation for a set of data points

Getting ready

How to do it…

How it works…

Univariate interpolation

Getting ready

How to do it…

Finding a cubic spline that interpolates a set of data

Getting ready

How to do it…

How it works...

Defining a B-spline for a given set of control points

Getting ready

How to do it…

How it works ...

Differentiation

Getting ready

How to do it...

How it works...

Solving a one-dimensional ordinary differential equation

Getting ready

How to do it...

How it works...

Solving a system of ordinary differential equations

Getting ready

How to do it...

How it works...

Solving differential equations and systems with parameters

Getting ready

How to do it...

How it works...

Using ode and the objected-oriented interface to solve differential equations

Getting ready

How to do it...

How it works ...

Statistics and Probability

Introduction

Computing the probability mass function of a discrete random variable

Binomial discrete distribution

Multinomial discrete distribution

How to do it...

Visualizing the probability mass function

Computing the probability density function of a continuous random variable

How to do it...

Computing the cumulative distribution function for a random variable

How to do it...

Computing the values of inverse probabilities associated with a random variable

How to do it...

Computing the average, standard deviation, and higher moments of a distribution

How to do it...

Average and standard deviation of a distribution

Calculating the moments of a distribution

Computing probabilities associated with the multivariate Gaussian distribution

How to do it...

Getting started with simulation

Computing the summary statistics of a dataset

How to do it...

Advanced Computations with SciPy

Discrete Fourier transforms

How to do it…

How it works…

Computing the discrete Fourier transform (DFT) of a data series using the FFT algorithm

How to do it…

How it works…

Computing the inverse DFT of a data series

How to do it…

How it works…

Computing signal construction

How to do it…

Getting started with filters

How to do it…

How it works…

Computing the DFT for two-dimensional data

How to do it…

How it works…

How to find the DFT of the derivative of a function

How to do it…

Computing the convolution of two functions

How to do it…

Mathematical imaging

How to do it…

Computing pairwise distances from a dataset, using different distance metrics

How to do it…

How to identify neighborhoods and nearest neighbors for a dataset and a given metric

How to do it…

How it works…

Nearest neighbors regression

How it works…

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部