Chinese Python Notes
Version: 0.0.1
Author: Li Jin Email: [email protected]
Due to copyright issues, no official authorization is currently granted for revisions and adaptations based on this note.
The content of the notes is for study reference only. Please do not use it for any commercial purposes without permission.
Github
is slow to load .ipynb
. It is recommended to view the project in Nbviewer.
The physical book based on this notebook: "Teach Yourself Python - Basics of Programming, Scientific Computing and Data Analysis" has been published.
JD.com’s self-operated link: https://item.jd.com/12328920.html
Available on Tmall, Amazon, and Dangdang.
Would you mind giving me a reward?
Introduction
Most of the content comes from the Internet.
Python 2.7
is installed by default, as well as related third-party packages ipython
, numpy
, scipy
, and pandas
.
life is short. use python.
It is recommended to use Anaconda, this IDE integrates most commonly used packages.
Note content is displayed using jupyter notebook
.
After installing Python
and the corresponding packages, you can enter:
to enter jupyter notebook
.
Basic environment configuration
conda update conda
conda update anaconda
refer to
- Enthought Training on Demand
- Computational Statistics in Python
- scipy.org
- Deep Learning Tutorials
- High Performance Scientific Computing
- Scipy Lectures
- pandas.org
Table of contents
You can open generate static files.ipynb
in Notebook, or run the code generate_static_files.py
in the command line to generate static HTML files.
- 01. Python tools
- 01.01 Introduction to Python
- 01.02 Ipython interpreter
- 01.03 Ipython notebook
- 01.04 Using Anaconda
- 02. Python basics
- 02.01 Python Getting Started Demo
- 02.02 Python data types
- 02.03 Number
- 02.04 String
- 02.05 Indexing and Sharding
- 02.06 List
- 02.07 Mutable and Immutable Types
- 02.08 Tuple
- 02.09 Speed comparison of lists and tuples
- 02.10 Dictionary
- 02.11 Collection
- 02.12 Immutable collections
- 02.13 Python assignment mechanism
- 02.14 Judgment statement
- 02.15 Loop
- 02.16 List comprehensions
- 02.17 Function
- 02.18 Modules and Packages
- 02.19 Exception
- 02.20 Warning
- 02.21 File reading and writing
- 03. Numpy
- 03.01 Introduction to Numpy
- 03.02 Matplotlib Basics
- 03.03 Numpy arrays and their indexes
- 03.04 Array type
- 03.05 Array methods
- 03.06 Array sorting
- 03.07 Array Shape
- 03.08 Diagonal
- 03.09 Conversion between array and string
- 03.10 Summary of array attribute methods
- 03.11 Functions that generate arrays
- 03.12 Matrix
- 03.13 General functions
- 03.14 Vectorized functions
- 03.15 Binary operations
- 03.16 ufunc object
- 03.17 choose function implements conditional filtering
- 03.18 Array broadcast mechanism
- 03.19 Array reading and writing
- 03.20 Structured Array
- 03.21 Record array
- 03.22 Memory mapping
- 03.23 From Matlab to Numpy
- 04. Scipy
- 04.01 Introduction to SCIentific PYthon
- 04.02 Interpolation
- 04.03 Probabilistic and statistical methods
- 04.04 Curve Fitting
- 04.05 Minimization function
- 04.06 Points
- 04.07 Solve differential equations
- 04.08 Sparse Matrix
- 04.09 Linear Algebra
- 04.10 Linear algebra of sparse matrices
- 05. Python Advanced
- 05.01 Introduction to sys module
- 05.02 Interacting with the operating system: the os module
- 05.03 CSV files and csv module
- 05.04 Regular expressions and re module
- 05.05 datetime module
- 05.06 SQL Database
- 05.07 Object-relational mapping
- 05.08 Function advancement: parameter passing, higher-order functions, lambda anonymous functions, global variables, recursion
- 05.09 Iterator
- 05.10 Generator
- 05.11 with statement and context manager
- 05.12 Modifiers
- 05.13 Use of modifiers
- 05.14 operator, functools, itertools, toolz, fn, funcy modules
- 05.15 Scope
- 05.16 Dynamic compilation
- 06. Matplotlib
- 06.01 Pyplot Tutorial
- 06.02 Use style to configure pyplot style
- 06.03 Processing text (basics)
- 06.04 Processing text (mathematical expressions)
- 06.05 Image Basics
- 06.06 Notes
- 06.07 Tags
- 06.08 figures, subplots, axes and ticks objects
- 06.09 Don’t be superstitious about default settings
- 06.10 Various drawing examples
- 07. Expand with other languages
- 07.01 Introduction
- 07.02 Python extension modules
- 07.03 Cython: Cython basics, convert source code into extension modules
- 07.04 Cython: Cython syntax, calling other C libraries
- 07.05 Cython: class and cdef class, using C++
- 07.06 Cython: Typed memoryviews
- 07.07 Generate compilation comments
- 07.08 ctypes
- 08. Object-oriented programming
- 08.01 Introduction
- 08.02 Modeling forest fires using OOP
- 08.03 What is an object?
- 08.04 Define class
- 08.05 Special methods
- 08.06 Properties
- 08.07 Forest Fire Simulation
- 08.08 Inheritance
- 08.09 super() function
- 08.10 Redefining Forest Fire Simulation
- 08.11 Interface
- 08.12 Public, private and special methods and properties
- 08.13 Multiple inheritance
- 09. Theano Basics
- 09.01 Introduction to Theano and its installation
- 09.02 Theano Basics
- 09.03 Theano configuration on Windows
- 09.04 Theano symbolic graph structure
- 09.05 Theano configuration and compilation mode
- 09.06 Theano conditional statements
- 09.07 Theano loop: scan (detailed explanation)
- 09.08 Theano Example: Linear Regression
- 09.09 Theano Example: Logistic Regression
- 09.10 Theano Example: Softmax Regression
- 09.11 Theano Example: Artificial Neural Network
- 09.12 Theano random number flow variable
- 09.13 Theano Example: More Complex Networks
- 09.14 Theano Example: Convolutional Neural Network
- 09.15 Theano tensor module: basics
- 09.16 Theano tensor module: index
- 09.17 Theano tensor module: operators and element-wise operations
- 09.18 Theano tensor module: nnet submodule
- 09.19 Theano tensor module: conv submodule
- 10. Interesting third-party modules
- 10.01 Use basemap to draw maps
- 10.02 Use cartopy to draw maps
- 10.03 Explore NBA Data
- 10.04 Jin Yong’s martial arts world
- 11. Useful Tools
- 11.01 pprint module: Print Python objects
- 11.02 pickle, cPickle module: Serializing Python objects
- 11.03 json module: processing JSON data
- 11.04 glob module: file pattern matching
- 11.05 shutil module: advanced file operations
- 11.06 gzip, zipfile, tarfile modules: processing compressed files
- 11.07 logging module: logging
- 11.08 string module: string processing
- 11.09 collections module: more data structures
- 11.10 requests module: HTTP for Human
- 12.Pandas
- 12.01 Get started with Pandas in ten minutes
- 12.02 One-dimensional data structure: Series
- 12.03 Two-dimensional data structure: DataFrame