Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created March 16, 2020 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aniruddha27/c8983213cb6f0069d9557c85efeb2d92 to your computer and use it in GitHub Desktop.
Save aniruddha27/c8983213cb6f0069d9557c85efeb2d92 to your computer and use it in GitHub Desktop.
#train rows
ntrain = train.shape[0]
#save log transform of target feature
target = np.log(train['SalePrice'])
#drop Id and SalePrice from train dataframe
train.drop(['Id','SalePrice'],inplace=True,axis=1)
#store test Id
test_id = test['Id']
#drop test Id
test.drop(['Id'],inplace=True,axis=1)
#concatenate train and test dataframes
train = pd.concat([train,test])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment