Created
February 21, 2018 09:01
-
-
Save stevenRush/1b6b97844e83547e6ea294fe7c5f3420 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
train = pd.read_csv("train.csv") | |
test = pd.read_csv("test.csv") | |
train_size = train.shape[0] | |
# extract label column before concatenating train and test | |
labels = train["Survived"] | |
train.drop("Survived", axis=1, inplace=True) | |
# concat train and test | |
all = pd.concat([train, test]) | |
# preprocess features here | |
# ... | |
# | |
# split all into train and test | |
train = all.iloc[:train_size] | |
test = all.iloc[train_size:] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment