机器学习---数据科学包
Mr_Wang0120
这个作者很懒,什么都没留下…
展开
-
机器学习---数据科学包-第5天
1 注释1import matplotlib.pyplot as plt2import numpy as npIn [2]:1x = np.arange(-10, 11, 1)2y = x * xIn [4]:1plt.plot(x, y)2plt.show()In [18]:1plt.plot(x, y)2# 添加注释3# 参数含义:注释内容;...原创 2020-04-18 16:23:29 · 113 阅读 · 0 评论 -
机器学习---数据科学包-第4天
1 Numpy简介1# 1 通过python的基础数据对象转化2import numpy as np3x = [1, 2, 3, 4]4x = np.array(x)5xOut[1]:array([1, 2, 3, 4])In [2]:1type(x)Out[2]:numpy.ndarrayIn [3]:1# 2 通过numpy内生的函数直接生成2...原创 2020-04-16 10:01:41 · 327 阅读 · 0 评论 -
机器学习---数据科学包-第3天
1 pandas索引1import pandas as pd2import numpy as np索引In [2]:1s = pd.Series(np.random.rand(5), index = list('abcde'))2sOut[2]:a 0.143653b 0.648518c 0.782733d 0.739794e 0...原创 2020-04-11 20:40:31 · 213 阅读 · 0 评论 -
机器学习---数据科学包-第2天
1 pandas快速入门(一).Series()方法。Series类型由一组数据及与之相关的数据索引组成。import pandas as pdimport numpy as nps = pd.Series([1, 3, 5, np.NaN, 8, 4])print(s)输出:0 1.01 3.02 5.03 NaN4 8.05 4.0...原创 2020-04-05 17:06:35 · 960 阅读 · 1 评论 -
机器学习---数据科学包-第1天
1 numpy属性import numpy as nparray = np.array([ [1, 2, 3], [2, 3, 4]])print(array)print('number of dimension:', array.ndim) # 矩阵的维度print('shape:', array.shape) # 矩阵的形状,几行几列print('size:',...原创 2020-03-28 21:36:39 · 192 阅读 · 0 评论