comment on my python script and so. e minor fix

I have a datamining project already done. i just need some explanations, comments and minor fixes to deliver to client. Eerything is fully analyzed in the ATTACHED doc. Also client says the python script crashes, why is this happening? The freelancer who created the script managed to run it.

I also attach the documented code and the description of the initial project.