![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
numpy数据科学库
yundanyi291
这个作者很懒,什么都没留下…
展开
-
matplotlib应用:球员能力图+股票k线图
文章目录一、球员能力图一、球员能力图#import matplotlib.pyplot as pltimport numpy as npplt.style.use('ggplot') #使用ggplot,画出来的图更美~#步骤一:创建四个对象ax1=plt.subplot(221,projection='polar')ax2=plt.subplot(222,projection='polar')ax3=plt.subplot(223,projection='polar')ax4=原创 2020-10-26 20:58:18 · 170 阅读 · 0 评论 -
numpy基础操作(三):完善maptplotlib画出的图
文章目录一、注释二、文字三、Tex公式四、区域填充五、形状六、图形的美化七、极坐标八、函数积分图(一)九、一、注释import matplotlib.pyplot as pltimport numpy as npx=np.arange(-10,11,1)y=x*xplt.plot(x,y)plt.annotate('this is the bottom',xy=(0,1),xytest=(-2,20),arrowprops=dict(facecolor='r',frac=0.2,headw原创 2020-10-25 17:26:30 · 319 阅读 · 0 评论 -
numpy基础操作(二):用matplotlib画图
文章目录一、散点图二、折线图一、散点图散点图用来表示两个变量间的关系height=[160,170,175,186]weight=[49,50,55,58]plt.scatter(heigth,weight) #将x和y的数据变成列表,然后填到plt.scatter(x,y)中plt.show()#股票价格波动open,close=np.loadtxt('0001.csv',delimiter=',',skiprows=1,usecols=(1,4),unpack=True)chan原创 2020-10-23 13:09:16 · 4802 阅读 · 3 评论 -
pandas基础操作(二):分组+聚合+数据io+时间序列
文章目录一、pandas索引二、分组计算三、聚合运算(一)内置聚合函数(二)自定义聚合函数一、pandas索引df=pd.DataFrame(np.random.randon(4,3),columns=['one','two','three'])df.index.name=row #将数组的行索引命名为rowdf.columns.name=col#判断是否有重复索引s=pd.Series(np.arange(5),index=list('abcda')) #创建重复索引s.index.i原创 2020-10-22 15:44:09 · 743 阅读 · 0 评论 -
pandas基本操作(一):创建数组+数据整形+数据透视
import pandas as pdimport numpy as nys1=pd.Series([1,3,4,np.NaN,8,4]) #创建pandas的关键数据结构s2=pd.DataFrame(np.random.randon(6,4),index=dates,columnS=list('A','B','C'))s2.values #将会输出六行四列的一个随机数组d={}data.describe() #对数据进行最大值、最小值等基本的数据描述data.T #原创 2020-10-19 20:47:56 · 3555 阅读 · 2 评论 -
numpy基础操作(一):array的基础操作
把列表转换为numpy可以识别的数组:import numpy as nparray=np.array([[1,2,3],[2,3,4]])print(array)print('number of dim',array.ndim) #矩阵有几维print('shape:',array.shape) #矩阵行数和列数print('size:',array.size) #矩阵有几个元素 #----------矩阵的创建----------------arra原创 2020-10-14 19:26:55 · 778 阅读 · 0 评论