Blogs can have many purposes. They can be to inform others, they can be to gain an audience, they can even be just a personal journal with the distinction that it's readable by others. Assuming you yourself are the driving force behind the blog, then just remember that you call the shots and there's really no rules you need to abide by. Just write it however you feel it should be written. If you find you're giving it too much thought to the point it's becoming a chore, then why bother?
With that said, here are some pointers for your situation. If the blog is primarily an online journal of your activities for your future self, then you probably want to include the code in case you find later down the road that you need to reuse it. If the blog is to inform others, then consider whether your main accomplishment is related to the script, the analysis, or the results, or some combination. For example, if you feel your script is really clever and does the bulk of the analysis automatically, then include it in the body and explain it (in addition to the code comments inline). If the script mainly serves to 'massage' the data (narrow down large amounts of data and get it into a format readable by humans for example) and the human is doing the bulk of the analysis, then maybe the script is better off as an appendix near the bottom of your post. If your blog exists mainly to inform readers of the results of your analysis, then you could even omit the script altogether or put it in a separate blog intended for Python developers.