Login using Social Account
     Continue with GoogleLogin using your credentials
Now you need to divide the dataset into train and test set.
Import the Pandas library as pd as follows:
import pandas as << your code goes here >>
Add the following function as is:
def load_titanic_data(filename, titanic_path=TITANIC_PATH):
csv_path = os.path.join(titanic_path, filename)
return pd.read_csv(csv_path)
Split the data into train and test set by calling the function we created in step 2:
train_data = << your code comes here >>("train.csv")
test_data = << your code comes here >>("test.csv")
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...