Implementing Neural Networks

I keep getting a name error with the “X” in the Implementing Neural Networks thing and I don’t know how to fix it or address the issue.
Here is my code:
import tensorflow as tf

import pandas as pd

import sklearn.model_selection as train_test_split

dataset = pd.read_csv(‘life_expectancy.csv’)



dataset = dataset.drop([‘Country’], axis = 1)

labels = dataset.iloc[:, -1] #select all the rows (:), and access the last column (-1)

features = dataset.iloc[:, 0:1] #select all the rows (:), and access columns from 0 to the last column

features = pd.get_dummies(features)

features_train, features_test, labels_train, labels_test = train_test_split(x, y, test_size = 0.20, random_state=23)

Do you have a link to the lesson?

1 Like