WeatherToData
介绍
使用 Python 进行气象数据分析.
使用到的库和函数
- matplotlib 绘图库,与 numpy 一起使用
- scikit-learn 库对数据进行回归分析
- numpy 库对数据进行切片
- pandas 数据分析的高级构建块
- reshape()函数,是数组 array 中的方法,作用是将数据重新组织
安装教程
-
numpy
安装:
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
安装验证:
>>> from numpy import * >>> eye(4) array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]])
-
pandas
安装:
pip install pandas
-
matplotlib
安装:
python -m pip install -U pip setuptools python -m pip install matplotlib
安装验证:
示例: import numpy as np import matplotlib.pyplot as plt # 计算正弦曲线上点的 x 和 y 坐标 x = np.arange(0, 3 * np.pi, 0.1) y = np.sin(x) plt.title("sine wave form") # 使用 matplotlib 来绘制点 plt.plot(x, y) plt.show()
-
scikit-learn
scikit-learn 是基于 numpy 和 matplotlib 之上的
安装pip install -U scikit-learn