text_html_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

df = pd.read_csv('../input/insurance.csv')

df.describe().T

df.shape

df.isna().sum()

df.duplicated().sum()

df = df.drop_duplicates()
df.duplicated().sum()

df.sex.unique()

df.region.unique()

df.smoker.value_counts()

df.smoker.replace({'no': 0, 'yes': 1}, inplace=True)

df.corr()

sns.scatterplot(x=df['bmi'], y=df['expenses'], hue=df['smoker'])