#!/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警告:原因未知,在spyder3上運行第二次就消失了,猜測是使用了緩存的原因
attr_trans-->屬性變換
programmer_1-->數據篩選
programmer_2-->平穩性檢測
programmer_3-->白噪聲檢測
programmer_4-->確定最佳p、d、q值,有問題!!!
programmer_5-->模型檢驗
programmer_6-->計算預測誤差
"""
# 屬性變換,改變列名
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[