Question: class Data(): # points [1] def dataAllocation(self,path): # TODO: Separate out the x_data and y_data and return each # args: string path for .csv file
class Data(): # points [1] def dataAllocation(self,path): # TODO: Separate out the x_data and y_data and return each # args: string path for .csv file # return: pandas dataframe, pandas series # ------------------------------- data = pd.read_csv(path) x_data = data.drop(columns=['y']) y_data = data['y'] # ------------------------------- return x_data,y_data
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
