Skip to content

Instantly share code, notes, and snippets.

@roboreport
Created August 13, 2019 07:56
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/63909713d82ba4d64114f3cf1282bc84 to your computer and use it in GitHub Desktop.
Save roboreport/63909713d82ba4d64114f3cf1282bc84 to your computer and use it in GitHub Desktop.
for s in range(1, 13):
train_sc_df['shift_{}'.format(s)] = train_sc_df['trade_price_idx_value'].shift(s)
test_sc_df['shift_{}'.format(s)] = test_sc_df['trade_price_idx_value'].shift(s)
train_sc_df.head(13)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment