if you are playing along heremake sure you modify the path passed to the ebub'sbnf'spn%jsfdupsz function to match wherever you installed the book materials in your systemand againif you're on mac or linuxplease pay attention to backslashes and forward slashes and all that stuff in this caseit doesn' matterbut you won' have drive letterif you're not on windows so just make sure those paths are actually pointing to where your tqbn and ibn folders are for this example nextebub'sbnf'spn%jsfdupsz is function wrotewhich basically says have path to directoryand know it' given classificationspam or hamthen it uses the sfbe'jmft functionthat also wrotewhich will iterate through every single file in directory so sfbe'jmft is using the ptxbml function to find all the files in directory then it builds up the full pathname for each individual file in that directoryand then it reads it in and while it' reading it init actually skips the header for each -mail and just goes straight to the textand it does that by looking for the first blank line it knows that everything after the first empty line is actually the message bodyand everything in front of that first empty line is just bunch of header information that don' actually want to train my spam classifier on so it gives me back boththe full path to each file and the body of the message so that' how we read in all of the dataand that' the majority of the codeso what have at the end of the day is dataframe objectbasically database with two columnsthat contains message bodiesand whether it' spam or not we can go ahead and run thatand we can use the ifbe command from the dataframe to actually preview what this looks likeebubifbe the first few entries in our dataframe look like thisfor each path to given file full of emails we have classification and we have the message body