程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

python_ data_ analysis_ and_ mining_ action-master-1

編輯:Python
# -*- coding: utf-8 -*-
"""
Created on Sat Oct 14 17:03:39 2017
@author: wnma3
"""
import os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
"""
Code instructions :
programmer_1: Make a box diagram
data.boxplot--> The data is converted to the dictionary format of box diagram
plt.annotate--> mapping
programmer_2: Calculate the data
range--> range
var--> variance
dis--> Interquartile
programmer_3: Draw a profit chart ( Scale and value )
programmer_4: Calculate pairwise correlation
data.corr()-->dataframe The correlation between them
data.corr()[u' Steamed chicken feet with lily sauce '] -->dataframe The relevance of one term to another
"""
def programmer_1(file_name):
catering_sale = file_name
data = pd.read_excel(catering_sale, index_col=u' date ')
plt.figure()
# Draw a box diagram
p = data.boxplot(return_type='dict')
x = p['fliers'][0].get_xdata()
y = p['fliers'][0].get_ydata()
y = np.sort(y)
for i in range(len(x)):
# Dealing with critical situations , i=0 when
temp = y[i] - 

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved