text_html_output_1.png
from sklearn import linear_model

import matplotlib.pyplot as plt # Visualization

import pandas  as pd #Data manipulation

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

from sklearn import linear_model
lin = linear_model.LinearRegression()

lin.fit(df[['age']], df.charges)
lin.predict([[40]])

lin.fit(df[['bmi']], df.charges)
lin.predict([[35]])

lin.fit(df[['children']], df.charges)
lin.predict([[2]])

lin.fit(df[['age', 'bmi', 'children']], df.charges)