Data Storytelling in Python

Julie Ann Delda
2 min readOct 2, 2020

Feel better, live better: Get the power that protects you at a lower cost.

In this blog, I’ll be sharing with you how to explore and visualize data using Python, particularly the insurance data that were given in the workshop. 😄

Without further ado let’s get down the steps!

This step let us import all the necessary libraries in Python.
After running the cell, the insurance file will be uploaded in Colab.
In this step, the features and dimension of the data were printed.
This step displays the data frame information including the data types and value counts for each column.
This step shows some basic statistical details like percentile, mean, std, etc of the data frame.

And now, let us visualize the data! 😆

This will show the relationship of Age vs. Charges
This will show the relationship of BMI vs. Charges
This will show the relationship of Number of Children vs. Charges

Insurance can provide you the peace of mind so you can have a peaceful life.

This Photo by Unknown Author is licensed under CC BY

But how do you achieve a peaceful mind and life at a cheaper cost?

This scatter plot shows the relationship between the age and the insurance charges depending if one is smoking or not. Each data point is one customer. The color indicates if the customer smokes (violet) or not (orange). The younger you are when you buy life insurance, the better, as it becomes more expensive as you get older.
This scatter plot shows the relationship between the BMI and the insurance charges depending if one is smoking or not. Each data point is one customer. The color indicates if the customer smokes (violet) or not (orange). Avoid vices (smoking) as it tends to have a higher rate insurance charge rather than the BMI.
This scatter plot shows that the number of children has the least relationship with insurance charges.

Having a smoker’s lifestyle can increase your insurance charge/premium..

So how can you get lower insurance charge?

Adapt a healthier lifestyle! 💪

--

--