內容簡介
Python是一種多範式的編程語言,既適閤麵嚮對象的應用開發,也適閤函數式設計模式。Python已然成為數據科學傢們在數據分析、可視化和機器學習方麵的**語言,它可以帶來高效率和高生産力。
《Python數據分析(影印版 英文版)》將教會初學者如何發掘Python的*大潛力用於數據分析,包括從數據獲取、清洗、操作、可視化以及存儲到復分析和建模等一切相關主題。它聚焦於一係列開源Python模塊,比如NumPy、SciPy、matplotlib、pandas、I Python、Cython、scikit-learn以及NLTK等。在後麵的章節裏,《Python數據分析(影印版 英文版)》涵蓋瞭數據可視化、信號處理與時間序列分析、數據庫、可預測分析及機器學習等主題。
目錄
Preface
Chapter 1: Getting Started with Python Libraries
Software used in this book
Installing software and setup
On Windows
On Linux
On Mac OS X
Building NumPy SciPy, matplotlib, and IPython from source
Installing with setuptools
NumPy arrays
A simple application
Using IPython as a shell
Reading manual pages
IPython notebooks
Where to find help and references
Summary
Chapter 2: NumPy Arrays
The NumPy array object
The advantages of NumPy arrays
Creating a multidimensional array
Selecting NumPy array elements
NumPy numerical types
Data type objects
Character codes
The dtype constructors
The dtype attributes
One-dimensional slicing and indexing
Manipulating array shapes
Stacking arrays
Splitting NumPy arrays
NumPy array attributes
Converting arrays
Creating array views and copies
Fancy indexing
Indexing with a list of locations
Indexing NumPy arrays with Booleans
Broadcasting NumPy arrays
Summary
Chapter 3: Statistics and Linear Algebra
NumPy and SciPy modules
Basic descriptive statistics with NumPy
Linear algebra with NumPy
Inverting matrices with NumPy,
Solving linear systems with NumPy
Finding eigenvalues and eigenvectors with-NumPy
NumPy random numbers
Gambling with the binomial distribution
Sampling the normal distribution
Performing a normality test with SciPy
Creating a NumPy-masked array
Disregarding negative and extreme values
Summary
Chapter 4: pandas Primer
Installing and exploring pandas
pandas DataFrames
pandas Series
Querying data in pandas
Statistics with pandas DataFrames
Data aggregation with pandas DataFrames
Concatenating and appending DataFrames
Joining DataFrames
Handling missing values
Dealing with dates
Pivot tables
Remote data access
Summary
Chapter 5: Retrieving, Processing, and Storing Data
Writing CSV files withNumPy and pandas
Comparing the NumPy .npy binary format and pickling
pandas DataFrames
Storing data with PyTables
Reading and writing pandas DataFrames to HDF5 stores
Reading and writing to Excel with pandas
Using REST web services and JSON
Reading and writing JSON with pandas
Parsing RSS and Atom feeds
Parsing HTML with Beautiful Soup
Summary
Chapter 6: Data Visualization
matplotlib subpackages
Basic matplotlib plots
Logarithmic plots
Scatter plots
Legends and annotations
Three-dimensional plots
Plotting in pandas
Lag plots
Autocorrelation plots
Plot.ly
Summary
Chapter 7: Signal Processing and Time Series
statsmodels subpackages
Moving averages
Window functions
Defining cointegration
Autocorrelation
Autoregressive models
ARMA models
Generating periodic signals
Fourier analysis
Spectral analysis
Filtering
Summary
Chapter 8: Working with Databases
Lightweight access with sqlite3
Accessing databases from pandas
SQLAIchemy
Installing and setting up SQLAIchemy
Populating a database with SQLAIchemy
Querying the database with SQLAIchemy
Pony ORM
Dataset - databases for lazy people
PyMongo and MongoDB
Storing data in Redis
Apache Cassandra
Summary
Chapter 9: Analyzing Textual Data and Social Media
Installing NLTK
Filtering out stopwords, names, and numbers
The bag-of-words model
Analyzing word frequencies
Naive Bayes classification
Sentiment analysis
Creating word clouds
Social network analysis
Summary
Chapter 10: Predictive Analytics and Machine Learning
A tour of scikit-learn
Preprocessing
Classification with logistic regression
Classification with support vector machines
Regression with ElasticNetCV
Support vector regression
Clustering with affinity propagation
Mean Shift
Genetic algorithms
Neural networks
Decision trees
Summary
Chapter 11: Environments Outside the Python Ecosystem and Cloud Computing
Exchanging information with MATLAB/Octave
Installing rpy2
Interfacing with R
Sending NumPy arrays to Java
Integrating SWIG and NumPy
Integrating Boost and Python
Using Fortran code through f2py
Setting up Google App Engine
Running programs on PythonAnywhere
Working with Wakari
Summary
Chapter 12: Performance Tuning, Profiling, and Concurrency
Profiling the code
Installing Cython
Calling C code
Creating a process pool with multiprocessing
Speeding up embarrassingly parallel for loops with Joblib
Comparing Bottleneck to NumPy functions
Performing MapReduce with Jug
Installing MPI for Python
IPython Parallel
Summary
Appendix A: Key Concepts
Appendix B: Useful Functions
matplotlib
NumPy
pandas
Scikit-learn
SciPy
scipy.fftpack
scipy.signal
scipy.stats
Appendix C: Online Resources
Index
精彩書摘
《Python數據分析(影印版)》:
Installing and exploring pandas
The minimal dependency set requirements for pandas is given as follows:
NumPy: This is the fundament alnumerical array package that we installed and covered extensively in the preceding chapters
python—dateuh I:Thisis a date—handlinglibrary
pytz: This handles time zone definitions
This list is the bare minimum; a longer list of optional dependencies can be locatedat http://pandas.pydata.org/pandas—docs/stable/install.html.We caninstall pandas via PyPI with pip or easy_install, using a binary installer, with theaid of our operating system package manager, or from the source by checking outthe code.The binary installers can be downloaded from http://pandas.pydata.org/getpandas.html.
The command to install pandas with pip is as follows:
pip install pandas
You may have to prepend the preceding command with sudo if your user accountdoesn't have sufficient rights.For most, if not all, Linux distributions, the pandaspackage name is python—pandas.Please refer to the manual pages of your packagemanager for the correct command to install.These commands should be the same asthe ones summarized in Chapter 1, Getting Started with Python Libraries.To install fromthe source, we need to execute the following commands from the command line:
$ git clone git://github.com/pydata/pandas.git
$ cd pandas
$ python setup.py install
This procedure requires the correct setup of the compiler and other dependencies;therefore, it is recommended only if you really need the most up—to—date versionof pandas.Once we have installed pandas, we can explore it further by addingpandas—related lines to our documentation—scanning script pkg_check.
……
前言/序言
Python數據分析(影印版) [Python Data Analysis] epub pdf mobi txt 電子書 下載 2024
Python數據分析(影印版) [Python Data Analysis] 下載 epub mobi pdf txt 電子書