当前位置:   article > 正文

利用Python 进行数据分析 Python_for_data_analysis 笔记_python for data analysis

python for data analysis

利用Python 进行数据分析  徐敬一  译

Python for Data Analysis:Data Wrangling with Pandas Numpy and IPython Author  Wes McKinney

http://github.com/wesm/pydata-book

1.3 重要的Python 库

  1. NumPy NumPy
  2. pandas pandas - Python Data Analysis Library
  3. matplotlib Matplotlib — Visualization with Python
  4. IPthon Jupyter
  5. SciPy
  6. scikit-learn
  7. statsmodels

第二章 Python 语言基础

第三章 内建数据结构,函数及文件

3.1.1元组

3.1.2 列表

3.1.3 内建序函数

3.1.4字典

3.1.5集合

3.2 函数

第四章 Numpy

  1. #chapter4 numpy basic
  2. from numpy import *
  3. eye(4)
  4. import numpy as np
  5. data = np.random.randn(2,3)
  6. data
  7. data.shape
  8. data.dtype
  9. #4.1.1 生成ndarray
  10. data1 = [6,7.5,8,0,1]
  11. arr1 = np.array(data1)
  12. arr1
  13. data2 = [[1,2,3,4],[5,6,7,8]]
  14. arr2 = np.array(data2)
  15. arr2
  16. arr2.ndim
  17. arr2.shape
  18. np.zeros(10)
  19. np.zeros((3,6))
  20. np.empty((2,3,2))
  21. np.arange(15)
  22. #深度学习入门 4.3.2 数值微分的例子
  23. import numpy as np
  24. import matplotlib.pylab as plt
  25. def function_1(x):
  26. return 0.01*x**2+0.1*x
  27. x=np.arange(0.0,20.0,0.1) # 以0.1 为单位,从0到20的数组X
  28. y=function_1(x)
  29. plt.xlabel("x")
  30. plt.ylabel("f(x)")
  31. plt.plot(x,y)
  32. plt.show()
  33. #4.1.2 ndarray 数据类型
  34. #4.1.3 numpy 数组计算
  35. #4.1.4 基础索引与切片
  36. arr= np.arange(10)
  37. arr
  38. arr[5]
  39. arr[5:8]
  40. #4.1.5 布尔索引
  41. names = np.array(['Bob','Joe','Will','Bob','will','Joe','Joe
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Guff_9hys/article/detail/897721
推荐阅读
相关标签
  

闽ICP备14008679号