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
14 changes: 13 additions & 1 deletion q01_load_data/build.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
# %load q01_load_data/build.py
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split

path = 'data/elecdemand.csv'


def q01_load_data(data):

df = pd.read_csv(data) # Load data and converting to DataFrame

# Make the Datetime column as object and Drop the index.
df['Datetime'] = pd.to_datetime(df['Datetime'], format = '%Y-%m-%d')
#df.index = df['Datetime']
return (df.shape, df)

q01_load_data(path)


Binary file added q01_load_data/tests/test_sol.pkl
Binary file not shown.
Binary file added q01_load_data/tests/user_sol.pkl
Binary file not shown.