Tutorial: Pass train_file.name instead of train_file
Change train_file to train_file.name in tutorial for Linear model.
This commit is contained in:
parent
1f82b7a5bf
commit
817c4db19e
@ -69,8 +69,8 @@ COLUMNS = ["age", "workclass", "fnlwgt", "education", "education_num",
|
|||||||
"marital_status", "occupation", "relationship", "race", "gender",
|
"marital_status", "occupation", "relationship", "race", "gender",
|
||||||
"capital_gain", "capital_loss", "hours_per_week", "native_country",
|
"capital_gain", "capital_loss", "hours_per_week", "native_country",
|
||||||
"income_bracket"]
|
"income_bracket"]
|
||||||
df_train = pd.read_csv(train_file, names=COLUMNS, skipinitialspace=True)
|
df_train = pd.read_csv(train_file.name, names=COLUMNS, skipinitialspace=True)
|
||||||
df_test = pd.read_csv(test_file, names=COLUMNS, skipinitialspace=True, skiprows=1)
|
df_test = pd.read_csv(test_file.name, names=COLUMNS, skipinitialspace=True, skiprows=1)
|
||||||
```
|
```
|
||||||
|
|
||||||
Since the task is a binary classification problem, we'll construct a label
|
Since the task is a binary classification problem, we'll construct a label
|
||||||
|
Loading…
Reference in New Issue
Block a user