Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions q01_load_data/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import numpy as np
from sklearn.model_selection import train_test_split

path = 'data/perrin-freres-monthly-champagne.csv'

def q01_load_data(path):
"write your solution here"


data = pd.read_csv(path)
return data
9 changes: 6 additions & 3 deletions q02_data_splitter/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
#import sys
#sys.path.append('./')
from greyatomlib.time_series_101_project.q01_load_data.build import q01_load_data

path = 'data/perrin-freres-monthly-champagne.csv'

def q02_data_splitter(path):
data = q01_load_data(path)
'''Write your solution here'''
data = q01_load_data(path)
data["Month"] = pd.to_datetime(data["Month"])
X_train = data[data["Month"] < '1971-10-01']
X_valid = data[data["Month"] >= '1971-10-01']
return X_train,X_valid
Binary file added q02_data_splitter/tests/test_sol.pkl
Binary file not shown.
Binary file added q02_data_splitter/tests/user_sol.pkl
Binary file not shown.
Binary file added test_sol.pkl
Binary file not shown.
Binary file added user_sol.pkl
Binary file not shown.