Advertisement

Python进行数据分析与可视化(seaborn,numpy,pandas,matplotlib)

阅读量:

借助matlplotlib这一常用的第三方库,可将相关数据导入并生成柱状图。## 柱状图

复制代码
    import matplotlib.pyplot as plt
    import string
    plt.xlabel('hour')
    plt.ylabel('time')
    plt.title('Average number of rides per hour per week')
    
    xx = []#存放X值
    yy = []
    
    
    def savey(str1):
    fx=open("f://"+str1,"r").read().split("\n")
    ax=[]
    x=[]
    s=0
    i=0
    for i in range(len(fx)):
        s=float(fx[i])
        ax.append(s)
    x=ax
    return x
    
    def savex(str1):
    fx=open("f://"+str1,"r").read().split("\n")
    ax=[]
    x=[]
    s=0
    i=0
    for i in range(len(fx)):
        s=

全部评论 (0)

还没有任何评论哟~