我们已经在Python运算中看到Python最基本的数学运算功能。此外,math包补充了更多的函数。当然,如果想要更加高级的数学功能,可以考虑选择标准库之外的numpy和scipy项目,它们不但支持数组和矩阵运算,还有丰富的数学和物理方程可供使用。 此外,random包可以用来生成随机数。随机数不仅 ...
分类:
编程语言 时间:
2017-02-07 15:12:38
阅读次数:
254
本人小白一枚,最近在精读《利用Python进行数据分析》虽然书中的代码实现是python2版本的,但准备手工把其中的代码用Python3敲一遍,希望可以尽快读完。 Numpy简介 Numpy(Numerical Python的简称)是高性能科学计算和数据分析的基础包。其部分功能如下: ①ndarra ...
分类:
其他好文 时间:
2017-02-07 13:59:59
阅读次数:
388
Python List numpy array numpy数组:元素只有一种类型,否则会转换成字符串。 不同的类型,不同的行为 numpy的构造子集 二维numpy数组 ndarray=n维数组 ...
分类:
其他好文 时间:
2017-02-07 01:13:39
阅读次数:
156
系统是windows32位,安装了python2.7.13。 主要需要 这些.exe在https://pan.baidu.com/s/1qXhFNmk#list/path=%2Fnumpy%2Cmatplotlib%2Cscipy 参考:http://blog.csdn.net/q__y__l/ar ...
分类:
编程语言 时间:
2017-02-04 20:22:23
阅读次数:
219
1 import pandas as pd 2 import numpy as np 3 s = pd.Series([1, 3, 6, np.nan, 44, 1]) 4 5 df= pd.DataFrame(np.random.random((4,5))) 6 7 # data frame 常用... ...
分类:
编程语言 时间:
2017-02-02 15:45:59
阅读次数:
305
1 import numpy as np 2 # 基础属性 3 array = np.array([[[1,2,3], [0,0,1]], [[1,2,3], [0,0,1]]], 4 dtype = np.int64) 5 6 print(array) 7 print(array.ndim) # ... ...
分类:
编程语言 时间:
2017-02-02 01:02:12
阅读次数:
301
numpy中的axis怎么理解:数组的维数,比如4*5数组,行为axis=1,列为axis=0 eg: a = np.arange(20).reshape(4,5)print "a:"print aprint "maximum element in each row of a: " + str(a. ...
分类:
编程语言 时间:
2017-01-25 12:41:24
阅读次数:
137
1. 聚类分析 聚类分析(cluster analysis):以相似性为基础把相似的对象通过静态分类的方法分成不同的组别或更多的子集。特性:基于相似性,有多个聚类中心。 K-Means:「K-均值」算法表示以空间中K个点为中心进行聚类,对最靠近他们的对象归类。 In [47]: from numpy ...
分类:
编程语言 时间:
2017-01-23 19:02:18
阅读次数:
277
Add kernel python3 in jupyter http://ipython.readthedocs.io/en/stable/install/kernel_install.html After this, still can not use numpy, to install nump ...
分类:
其他好文 时间:
2017-01-21 13:06:12
阅读次数:
186