Skip to content

Instantly share code, notes, and snippets.

@piyush2896 piyush2896/
Created Oct 30, 2018

What would you like to do?
import pandas as pd
import numpy as np
def get_train_data():
df = pd.read_csv('datasets/all_stocks_5yr.csv')
data_aal = df[df['Name'] == 'AAL']
X_train = data_aal[data_aal.columns[1:5]].values[:-1]
Y_train = np.expand_dims(data_aal['open'].values[1:], 1)
return X_train, Y_train
def get_test_data():
data_aal = pd.read_csv('datasets/AAL.csv')
X_test = data_aal[data_aal.columns[1:5]].values[:-1]
Y_test = np.expand_dims(data_aal['Open'].values[1:], 1)
return X_test, Y_test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.