Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@roboreport
Created June 21, 2019 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roboreport/8cec3a757f7e9879d93827f6524634af to your computer and use it in GitHub Desktop.
Save roboreport/8cec3a757f7e9879d93827f6524634af to your computer and use it in GitHub Desktop.
# 2017/1/1 까지의 데이터를 트레이닝셋.
# 그 이후 데이터를 테스트셋으로 한다.
split_date = pd.Timestamp('01-01-2017')
train = df.loc[:split_date, ['trade_price_idx_value']]
test = df.loc[split_date:, ['trade_price_idx_value']]
ax = train.plot()
test.plot(ax=ax)
plt.legend(['train', 'test'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment