#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pylint: disable=E1101
"""
Created on Sat Nov 4 11:04:32 2017
@author: lu
"""
import pandas as pd
from statsmodels.stats.diagnostic import acorr_ljungbox
from statsmodels.tsa.arima_model import ARIMA
from statsmodels.tsa.stattools import adfuller as ADF
"""
FutureWarning Warning : Unknown cause , stay spyder3 It disappeared the second time , Guess the reason for using cache
attr_trans--> Attribute transformation
programmer_1--> Data filtering
programmer_2--> Stability detection
programmer_3--> White noise detection
programmer_4--> Determine the best p、d、q value , There is a problem !!!
programmer_5--> Model test
programmer_6--> Calculate the prediction error
"""
# Attribute transformation , Change column name
def attr_trans(x):
result = pd.Series(
index=["SYS_NAME", "CWXT_DB:184:C:\\", "CWXT_DB:184:D:\\", "COLLECTTIME"])
result["SYS_NAME"] = x["SYS_NAME"].iloc[0]
result["COLLECTTIME"] = x["COLLECTTIME"].iloc[