diff --git a/Mission433Solutions.ipynb b/Mission433Solutions.ipynb index 9ee4f3a..b915550 100644 --- a/Mission433Solutions.ipynb +++ b/Mission433Solutions.ipynb @@ -949,11 +949,11 @@ "p_ham = len(ham_messages) / len(training_set_clean)\n", "\n", "# N_Spam\n", - "n_words_per_spam_message = spam_messages['SMS'].apply(lambda x: len(x))\n", + "n_words_per_spam_message = spam_messages['SMS'].apply(len)\n", "n_spam = n_words_per_spam_message.sum()\n", "\n", "# N_Ham\n", - "n_words_per_ham_message = ham_messages['SMS'].apply(lambda x: len(x))\n", + "n_words_per_ham_message = ham_messages['SMS'].apply(len)\n", "n_ham = n_words_per_ham_message.sum()\n", "\n", "# N_Vocabulary\n",