《Python数据分析基础教程:Numpy学习指南》 常用模块与方法简要记录

简介: 《Python数据分析基础教程:Numpy学习指南》 常用模块与方法简要记录

第三章 numpy的常用函数1.savetxt

2.loadtxt (converters): datetime.datetime.strptime [p46]

3.average

4.mean

5.max

6.min

7.ptp

8.median

9.msort/sort

10.var

11.diff

12.std

13.where

14:take

15:argmax ----- *

16:argmin ----- *

17.ravel

18.split\hsplit\vsplit

19.apply_along_axis

20.maximum ----- *

21.minimum ----- *

22.convolve

23.eye

24.zeros

25.ones

26.linspace

27.exp

28.fill

29.linalg.lstsq

30.dot

31.ones_like

32.intersect1d

33.vstack\hstack\dstack\column_stack\row_stack

34.concatenate

ndarray常用函数和属性ndarray的常用函数

1.mean

2.ravel

3.sum

4..clip

5.compress

6.prod

7.cumprod

8.tolist

9.astype

10.resh


ndarray的常用属性

1.ndim

2.size

3.itemsize

4.shape

5.dtype

6.nbytes

7.T

8.real

9.imag

10.flat

第四章 numpy的便捷函数1.diagonal

2.trace

3.cov

4.corrcoef

5.std ddof=1

6.polyfit

7.polyval

8.roots

9.polyder

10.sign

11.piecewise

12.vectorize

13.hanning

14.polysub

15.isreal

16.select

17.trim_zeros

第五章 矩阵和通用函数1.mat

① 专用字符串: " "行间隔, ";"列间隔

② 数组

2.bmat

3.frompyfunc

4.zeros_like

5.add.reduce

6.add.accumulate

7.add.reduceat

8.add.outer

9.add\subtract\multiply\divide\true_divide\floor_division

10."/" "//"

11.mod\%\remainder\fmod

12.matrix

第六章 深入Numpy模块1.np.dual

2.np.linalg.inv

3.np.mat 注意,矩阵乘法和数组乘法不相同,与数组dot方法相同

4.np.linalg.solve

5.np.linalg.eigvals

6.np.linalg.eig

7.np.linalg.svd

8.np.linalg.pinv

9.np.linalg.det

10.np.fft.fft

11.np.fft.ifft

12.np.all

13.np.linalg.fftshift

14.np.linalg.ifftshift

15.np.random.binomial

16.np.random.hypergeometirc

17.np.random.beta

chisquare

exponential

f

gamma

gumbel

laplace

lognormal

logistic

multivariate_nomal

noncentral_chisquare

noncentral_f

normal

第七章 Numpy专用函数1.np.sort

lexsort

argsort

ndarray.sort

msort

sort_complex

2.np.argmax

3.np.nanargmax

4.np.argmin

5.np.nanargmin

6.np.argwhere

7.np.searchsorted

8.np.extract

9.np.insert

10.np.nonzero

11.np.bartlett

12.np.blackman

13.np.hamming

14.np.hanning

15.np.kaiser

12.np.i0

13.np.sinc

第八章 质量控制1.np.testing.assert_almost_equal

2.np.testing.assert_approx_equal

3.np.testing.assert_array_almost_equal

4.np.testing.assert_array_equal

5.np.testing.assert_array_less

6.np.testing.assert_equal

7.np.testing.assert_raises

8.np.testing.assert_warns

9.np.testing.assert_string_equal

10.np.testing.assert_allclose

11.np.testing.assert_alloclose

12.np.testing.assert_array_almost_equal_nulp

13.np.testing.assert_array_max_ulp

14.import unittest

from numpy.testing.decorators import setastest

from numpy.testing.decorators import skipif

from numpy.testing.decorators import knownfailureif

from numpy.testing import decorate_methods

15.numpy.testing.decorators.deprecated

16.numpy.testing.decorators.knownfailureif

17.numpy.testing.decorators.setastest

18.numpy.testing.decorators.skipif

19.numpy.testing.decorators.slow

20.from numpy.testing import rundocs

第九章 使用Matplotlib1.import matplotlib.pyplot as plt

2.np.poly1d

3.plt.plot

4.plt.xlabel

5.plt.ylabel

6.plt.show

7.np.poly1d.deriv

8.plt.subplot

9.plt.title

10.plt.figure

11.plt.figure.add_subplot

12.axis.set_major_locator

13.axis.set_minor_locator

14.axis.set_major_fomatter

15.figure.autofmt_xdate

16.from datetime import date

17.date.today

18.plt.hist

19.plt.semilogx

20.plt.semilogy

21.plt.loglog

22.plt.scatter

23.figure.set_title

24.plt.grid

25.plt.fill_between

26.plt.legend

27.plt.annotate

28.np.meshgrid

29.plt.plot_surface

30.plt.contour/plt.contourf

31.np.random.rand

32. import matplotlib.animation as animation

33. animation.FuncAnimation

34. from mpl_toolkits.mplot3d import Axes3D

第十章 SciPy0.from scipy import stats

1. stats.norm.rvs

2.stats.norm.fit

3.stats.kurtosistest

4.stats.skewtest

5.stats.normaltest

6.stats.scoreatpercentile

7.stats.percentileofscore

8.stats.ttest_ind

9.stats.ks_2samp

10.from scikits.statsmodels.stattools import jarque_bera

11.from scipy import signal

signal.detrend

12.from scipy import fftpack

fftpack.fftshift

fftpack.rfft

ffpack.iffshift

ffpack.irfft

13.from scipy import optimize

optimize.leastsq

14.from scipy import integrate

integrate.quad

15.from scipy imprt interpolate

interpolate.interp1d

interpolate.interp2d

16.from scipy import ndimage

ndimage.median_filter

ndimage.rotate

ndimage.prewitt

17.from scipy import misc

image = misc.lena().astype(np.float)

18.plt.imshow(image,  cmap=plt.cm.gray)

19. from scipy.io import wavfile

wavfile.read

wavfile.write

20.np.tile

21.import urllib2

urllib2.urlopen


目录
相关文章
|
2月前
|
SQL 关系型数据库 数据库
Python SQLAlchemy模块:从入门到实战的数据库操作指南
免费提供Python+PyCharm编程环境,结合SQLAlchemy ORM框架详解数据库开发。涵盖连接配置、模型定义、CRUD操作、事务控制及Alembic迁移工具,以电商订单系统为例,深入讲解高并发场景下的性能优化与最佳实践,助你高效构建数据驱动应用。
345 7
|
2月前
|
存储 Java 数据处理
(numpy)Python做数据处理必备框架!(一):认识numpy;从概念层面开始学习ndarray数组:形状、数组转置、数值范围、矩阵...
Numpy是什么? numpy是Python中科学计算的基础包。 它是一个Python库,提供多维数组对象、各种派生对象(例如掩码数组和矩阵)以及用于对数组进行快速操作的各种方法,包括数学、逻辑、形状操作、排序、选择、I/0 、离散傅里叶变换、基本线性代数、基本统计运算、随机模拟等等。 Numpy能做什么? numpy的部分功能如下: ndarray,一个具有矢量算术运算和复杂广播能力的快速且节省空间的多维数组 用于对整组数据进行快速运算的标准数学函数(无需编写循环)。 用于读写磁盘数据的工具以及用于操作内存映射文件的工具。 线性代数、随机数生成以及傅里叶变换功能。 用于集成由C、C++
331 1
|
3月前
|
测试技术 开发者 Python
Python单元测试入门:3个核心断言方法,帮你快速定位代码bug
本文介绍Python单元测试基础,详解`unittest`框架中的三大核心断言方法:`assertEqual`验证值相等,`assertTrue`和`assertFalse`判断条件真假。通过实例演示其用法,帮助开发者自动化检测代码逻辑,提升测试效率与可靠性。
362 1
|
2月前
|
监控 安全 程序员
Python日志模块配置:从print到logging的优雅升级指南
从 `print` 到 `logging` 是 Python 开发的必经之路。`print` 调试简单却难维护,日志混乱、无法分级、缺乏上下文;而 `logging` 支持级别控制、多输出、结构化记录,助力项目可维护性升级。本文详解痛点、优势、迁移方案与最佳实践,助你构建专业日志系统,让程序“有记忆”。
255 0
|
2月前
|
Java 数据处理 索引
(numpy)Python做数据处理必备框架!(二):ndarray切片的使用与运算;常见的ndarray函数:平方根、正余弦、自然对数、指数、幂等运算;统计函数:方差、均值、极差;比较函数...
ndarray切片 索引从0开始 索引/切片类型 描述/用法 基本索引 通过整数索引直接访问元素。 行/列切片 使用冒号:切片语法选择行或列的子集 连续切片 从起始索引到结束索引按步长切片 使用slice函数 通过slice(start,stop,strp)定义切片规则 布尔索引 通过布尔条件筛选满足条件的元素。支持逻辑运算符 &、|。
175 0
|
4月前
|
机器学习/深度学习 数据采集 数据挖掘
基于 GARCH -LSTM 模型的混合方法进行时间序列预测研究(Python代码实现)
基于 GARCH -LSTM 模型的混合方法进行时间序列预测研究(Python代码实现)
157 2
|
4月前
|
调度 Python
微电网两阶段鲁棒优化经济调度方法(Python代码实现)
微电网两阶段鲁棒优化经济调度方法(Python代码实现)
136 0
|
3月前
|
人工智能 数据安全/隐私保护 异构计算
桌面版exe安装和Python命令行安装2种方法详细讲解图片去水印AI源码私有化部署Lama-Cleaner安装使用方法-优雅草卓伊凡
桌面版exe安装和Python命令行安装2种方法详细讲解图片去水印AI源码私有化部署Lama-Cleaner安装使用方法-优雅草卓伊凡
433 8
桌面版exe安装和Python命令行安装2种方法详细讲解图片去水印AI源码私有化部署Lama-Cleaner安装使用方法-优雅草卓伊凡
|
2月前
|
JSON 算法 API
Python中的json模块:从基础到进阶的实用指南
本文深入解析Python内置json模块的使用,涵盖序列化与反序列化核心函数、参数配置、中文处理、自定义对象转换及异常处理,并介绍性能优化与第三方库扩展,助你高效实现JSON数据交互。(238字)
382 4
|
2月前
|
Java 调度 数据库
Python threading模块:多线程编程的实战指南
本文深入讲解Python多线程编程,涵盖threading模块的核心用法:线程创建、生命周期、同步机制(锁、信号量、条件变量)、线程通信(队列)、守护线程与线程池应用。结合实战案例,如多线程下载器,帮助开发者提升程序并发性能,适用于I/O密集型任务处理。
289 0

推荐镜像

更多