-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathops.py
More file actions
34 lines (22 loc) · 589 Bytes
/
Copy pathops.py
File metadata and controls
34 lines (22 loc) · 589 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""Helper functions.
@author Zhenye Na 05/21/2018
"""
# from tqdm import tqdm
# import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# import matplotlib
# matplotlib.use('Agg')
def read_data(input_path, debug=True):
"""Read nasdaq stocks data.
Args:
input_path (str): directory to nasdaq dataset.
Returns:
X (np.ndarray): features.
y (np.ndarray): ground truth.
"""
df = pd.read_csv(input_path)
df_no_date = df.drop(["Close",'Date'], axis=1)
X = df_no_date.values
y = df['Close'].values
return X, y