I just finished my medical insurance project. I actually did this twice, since I was already “ahead” of this part of the course when they did the switch. I did it with just Pandas and Pivot tables initially, but then I went back and did it using classes and class methods instead, which is what you see here.
I used Pandas to load the data rather than CSV as I don’t really see the need for CSV when pandas can do the same a lot more cleanly? Maybe there is some aspect of CSV I’m missing.
Thanks for any and all feedback.
csv module is included in the standard python libraries whereas pandas is a 3rd party library and quite a big one at that. It some cases you might not be able to work with
pandas so it’s worth knowing the basics of how to use
csv even if you perform most work with
pandas. For this project I think
pandas works quite nicely but it’s worth keeping in mind that you might have to use an alternative at some point.
Congrats on completing this project. You seem to have understood the dataset from what I can tell which is one of the main points.
I would suggest adding a few extra lines or some data to tell the viewer about your dataset early on. Without reading your code (which many people cannot do) it’s not easy to tell what kind of data you even have. Maybe provide the column names and perhaps an example dataset so that the viewer can understand what is being analysed. Whilst it may be obvious to you it’s very important to pass this information on the viewer in a clear, concise way or you risk them failing to understand the rest of your analysis.
Perhaps reconsider your display of data. I think it’d be worthwhile rounding/formatting some your values so that it’s more readable. One or two decimal places at most would provide you with just as much practical information in a much cleaner way. Also consider altering the size of your images. At present the text is kind of pushed together with a font smaller than the rest of the text making it harder to read and view the images.
As a bit of on optional extension you have looked into both
bmi but not
smoking so if you have the time perhaps it would be worth analysing how that relates to your data too.