Guest User

Untitled

a guest
May 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. # Taking care of the 'label' feature - We convert all the attack types into the 'attack' variable
  2.  
  3. cleanup_nums = {'label' : {'normal.' : 1, 'buffer_overflow.' : 0, 'loadmodule.' : 0, 'perl.' : 0, 'neptune.' : 0,
  4. 'smurf.' : 0, 'guess_passwd.' : 0, 'pod.' : 0, 'teardrop.' : 0, 'portsweep.' : 0, 'ipsweep.' : 0,
  5. 'land.' : 0, 'ftp_write.' : 0, 'back.' : 0, 'imap.' : 0, 'satan.' : 0, 'phf.' : 0, 'nmap.' : 0,
  6. 'multihop.' : 0, 'warezmaster.' : 0, 'warezclient.' : 0, 'spy.' : 0, 'rootkit.' : 0}}
  7.  
  8. df.replace(cleanup_nums, inplace = True)
Add Comment
Please, Sign In to add comment