Hey everyone,
Here is the link to my portfolio project: US-Medical-Insurance-Portfolio-Project/us-medical-insurance-costs_Natalie_Klein_Tijssink.ipynb at c64ed37f726f5851ad6286d4a04ea9f16a31e389 · declaredrebel/US-Medical-Insurance-Portfolio-Project · GitHub
I am stuck on the function I created for determining the total amount of smokers and non-smokers in the dataset. I would love to have some feedback on what I could improve in this function.
With kind regards,
Natalie
In order for anyone to view it, you would need to push the notebook to GitHub. As it is now, you linked something to your computer, which we cannot see.
Alternatively, you can create a notebook file in Google Colab and then set the sharing permissions to “anyone with the link can view it” (so ppl cannot make changes).
1 Like
Thank you for your feedback. I changed the link.
1 Like
Hello!
I’m quite a newbie, but I think your smoker/non-smoker function is not working only because the strings are case-sensitive!
In other words, in your method “analyze_smoker_status”, all you need to do is change the if conditions to …
==“yes” (instead of “Yes”)
==“no” (instead of “No”)
Give it a try and then come back at me.
2 Likes
Thanks for the tip, the function works now 