def series_to_supervised(data, n_in, n_out=1):
    df = DataFrame(data)
    cols = list()
    for i in range(n_in, 0, (- 1)):
        cols.append(df.shift(i))
    for i in range(0, n_out):
        cols.append(df.shift((- i)))
    agg = concat(cols, axis=1)
    agg.dropna(inplace=True)
    return agg.values
def series_to_supervised(data, n_in, n_out=1):
    df = DataFrame(data)
    cols = list()
    for i in range(n_in, 0, (- 1)):
        cols.append(df.shift(i))
    for i in range(0, n_out):
        cols.append(df.shift((- i)))
    agg = concat(cols, axis=1)
    agg.dropna(inplace=True)
    return agg.values