# Time: 2020/08/06
#Author: Xiaohong
# 运行环境: OS: Windows 10
# Python: 3.7
# 功能: 导入1份文件, 把数据排序,透视,划分Level,并显示
效果如下:
主程序(Tl_B0B.py)
import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
data_file=r'E:\\vscode_2020\\vstestfxh\\fxh_qt501\\fxh_qt501\\source_file\\sfpis\\200.csv'
output_path='./output'
if not os.path.exists(output_path):
os.makedirs(output_path)
def collect_data():
''' 以panda方式导入数据,仅导入需要的列
'''
cols_arr=['LOT_NO','COMPONENT','DATE_IN','IN_QTY','DATE_OUT','STOCK_NO']
data_df=pd.read_csv(data_file,usecols=cols_arr)
return data_df
def process_data(data_df):
'''以'STOCK_N