진행 중
This commit is contained in:
17
utility.py
Normal file
17
utility.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
|
||||
def load_data():
|
||||
df = pd.read_csv('data/sample.txt', delimiter=',', header=None).astype(np.float32)
|
||||
|
||||
#df = pd.read_csv('data/ex1data1.txt', delimiter=',', header=None).astype(np.float32)
|
||||
|
||||
#df = pd.read_csv('data/train.csv', delimiter=',', comment='#').astype(np.float32)
|
||||
#df[0] = df['x']
|
||||
#df[1] = df['y']
|
||||
|
||||
df[2] = pd.Series([1]*len(df[0]))
|
||||
df = df.reindex(columns=[1, 2, 0])
|
||||
|
||||
return df
|
||||
Reference in New Issue
Block a user