Skip to content

Instantly share code, notes, and snippets.

@rian-dolphin
Created November 3, 2021 21:39
Show Gist options
  • Save rian-dolphin/2e3e406119dc7d787ca554f1a16ad2c4 to your computer and use it in GitHub Desktop.
Save rian-dolphin/2e3e406119dc7d787ca554f1a16ad2c4 to your computer and use it in GitHub Desktop.
def train_test(df, test_periods):
train = df[:-test_periods].values
test = df[-test_periods:].values
return train, test
test_periods = 8
train, test = train_test(df, test_periods)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment