08 2020 档案

文件的读取和写入
摘要:1. excel文件 使用pandas读取: 1 lon lat 2 140 45 import pandas as pd path = 'D:/Data/data.xlsx' df = pd.read_excel(path) # 读取lon这一列 df.lon() # 读取lon这一列的值 lon 阅读全文

posted @ 2020-08-16 17:07 whale_kevin 阅读(131) 评论(0) 推荐(0)

Mayavi库
摘要:安装就是正常使用 conda install 和 pip install 就可以了。 使用时Pycharm和Spyder调用Mayavi总是失败,但Jupiter notebook可以正常使用。 阅读全文

posted @ 2020-08-15 11:40 whale_kevin 阅读(212) 评论(0) 推荐(0)

Python 中时间的处理
摘要: 阅读全文

posted @ 2020-08-15 11:34 whale_kevin 阅读(105) 评论(0) 推荐(0)

Python 中变量的保存和读取
摘要:1. 保存为matlab可读的.mat文件 from scipy.io import savemat savemat('ab.mat', {'a': a, 'b': b}) 2. 使用numpy保存为.npy或者.npz文件 import numpy as np np.save('a', a = a 阅读全文

posted @ 2020-08-14 16:48 whale_kevin 阅读(2943) 评论(0) 推荐(0)

python 中的矩阵及其运算
摘要:python做矩阵运算并没有matlab那么方便,但是依靠numpy和scipy库也算是基本替代了我之前的工作。总觉得学的比较乱,为了能方便之后的查阅并且督促自己坚持学下去,就想把一些重要的点记录一下。 1. 将列表转换为矩阵 x = [1, 2, 3] x1 = np.matrix(x) #生成一 阅读全文

posted @ 2020-08-14 15:42 whale_kevin 阅读(943) 评论(0) 推荐(0)

python matplolib 绘图不显示的原因
摘要:如果x, y是两个行向量, matplotlib画图会不显示。 阅读全文

posted @ 2020-08-14 15:37 whale_kevin 阅读(255) 评论(0) 推荐(0)

ndarray object of module 转换为 array的方法
摘要:np.asarray(y, 'float64') 阅读全文

posted @ 2020-08-08 15:30 whale_kevin 阅读(678) 评论(0) 推荐(0)

MinGW 包下载失败原因
摘要:学校电脑总是无法下载安装包,需要FQ! 阅读全文

posted @ 2020-08-06 14:50 whale_kevin 阅读(1116) 评论(0) 推荐(0)

导航