0
파이썬 프로그램 : 여기에 .shift 함수가 있습니다 (df [fore] .shift (-fore_out)). 무엇을하고 있는지 설명 할 수 있습니까?아래 코드에서 shift 기능이 어떻게 작동합니까?
import pandas as pd
import quandl
import math
df = quandl.get('WIKI/GOOGL')
fore = 'Adj. Open'
df.fillna(-99999,inplace=True)
fore_out =math.ceil(0.1*len(df))
df['label'] = df[fore].shift(-fore_out)
print(df.head())
행 개수의 10 %만큼 행을 이동하면 [docs] (http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.shift)를 읽을 수 있습니다. .html # pandas.Series.shift) – EdChum