ktl014
8/10/2017 - 7:21 AM

Create dataframe and inspect the first couple rows of the loaded dataframes using the .head() method with the code provided from: https://ca

Create dataframe and inspect the first couple rows of the loaded dataframes using the .head() method with the code provided from: https://campus.datacamp.com/courses/kaggle-python-tutorial-on-machine-learning/getting-started-with-python?ex=2

# Import the Pandas library
import pandas as pd
# Load the train and test datasets to create two DataFrames
train_url = "http://s3.amazonaws.com/assets.datacamp.com/course/Kaggle/train.csv"
train = pd.read_csv(train_url)

test_url = "http://s3.amazonaws.com/assets.datacamp.com/course/Kaggle/test.csv"
test = pd.read_csv(test_url)
#Print the `head` of the train and test dataframes
print(train.head())
print(test.head())