-2

i would like to ask about creating x_train, y_train and x_test, y_test on CSV has been split into two between data_train.csv and data_test.csv

1 Answers1

0

This seems a general question, but I can answer with:

You can use following block to import these csv files in your env.

import pandas as pd # for CSV file I/O operations
train = pd.read_csv('../input/data_train.csv')
test = pd.read_csv('../input/data_test.csv')

I did not see your .csv files but it must be:

# x is features, y is your target column
x_train = train.loc[:,1:] 
y_train = train.loc[:,0]

x_test = test.loc[:,1:] 
y_test = test.loc[:,0]

So, you can obtain the x and y values, if it is not working please open your .csv and parse the coordinates accordingly :)