Skip to content

Instantly share code, notes, and snippets.

@piEsposito
Created April 14, 2020 20:57
Show Gist options
  • Save piEsposito/21e33d522f0d055a9c81ce1eec2276b1 to your computer and use it in GitHub Desktop.
Save piEsposito/21e33d522f0d055a9c81ce1eec2276b1 to your computer and use it in GitHub Desktop.
#importing the dataset
amazon="data/AMZN_2006-01-01_to_2018-01-01.csv"
ibm="data/IBM_2006-01-01_to_2018-01-01.csv"
df = pd.read_csv(ibm)
#scaling and selecting data
close_prices = df["Close"]
scaler = StandardScaler()
close_prices_arr = np.array(close_prices).reshape(-1, 1)
close_prices = scaler.fit_transform(close_prices_arr)
close_prices_unscaled = df["Close"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment