My answer to: Guided Project: Building a Spam Filter with Naive Bayes

Hi all!

I’ve just finished another guided project on my DQ learning path, and I would like to share it with the community. Any feedback would be appreciated! :slight_smile:

Here’s the URL of the last mission screen of the Guided Project and my notebook (.ipynb file):
Building a Spam Filter with Naive Bayes.ipynb (158.4 KB)

Have a nice day!

Click here to view the jupyter notebook file in a new tab

Great come back @alvaro.viudez

Your project made me to go direct to ipython documentation just to check what you needed to show with (currently, the string is being printed):

display(file.head(), "<style>.container { width:100% !important; }</style>")

Maybe there’s an argument needed for that string?

My trick for this :point_down: is using None where you’ve written 1, and also adding pd.set_option('display.max_columns', None) to make sure no wide data frame columns are truncated when being displayed.

# Set wider columns to properly read SMS texts in outputs
pd.set_option('display.max_colwidth', 1)

Your project looks amazing! :tada: :raised_hands:

1 Like

Hi @info.victoromondi ,

Thank you very much for your piece of advice! I’ve just tried it and works nice!

You’re right, I don’t know where I picked that line from, because it’s useless once we write the line:

pd.set_option(‘display.max_colwidth’, None)

So, I’ve written down how you do it so I will not have problems with that in the future!

Have a nice day :slight_smile:

1 Like