-
-
Save BinarySpoon/79ab2d255c8ea9e83b4e02ca21e91b2d to your computer and use it in GitHub Desktop.
This file contains 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
#PREPROCESSING --> | |
#----------------- | |
print('#PREPROCESSING') | |
# removing columns --> | |
drop_columns = ['Unnamed: 2','Unnamed: 3','Unnamed: 4'] | |
data.drop(columns=drop_columns,axis=1,inplace=True) | |
rename_columns = {'v1':'label','v2':'message'} | |
data.rename(rename_columns,axis=1,inplace=True) | |
data.label = data.label.map({'ham':1,'spam':0}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment