tejank10 / Spam-or-Ham

30 stars 46 forks source link

manual input of dataset spam and ham count #4

Open ashok-kavungal opened 6 years ago

ashok-kavungal commented 6 years ago

hi , i used this code for my project work but on differnt datasets..so each time i had to edit the data totalMails variable. so i thought if you replece that part it code will be more efficient. i used this code to calculate totalMails variable in the code;

number_of_mails = mails['labels'].value_counts() count_array = pd.Series(number_of_mails).values totalMails = count_array[0] + count_array[1] print(totalMails)