text_plain_output_1.png
from sklearn.linear_model import LinearRegression

from sklearn.preprocessing import PolynomialFeatures

import pandas as pd

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

df = pd.read_csv('../input/polynomial/HeightVsWeight.csv')

X = df.iloc[:, :-1].values
Y = df.iloc[:, -1].values

from sklearn.preprocessing import PolynomialFeatures
poly_reg = PolynomialFeatures(degree=10)
X_poly = poly_reg.fit_transform(X)
lin_reg = LinearRegression()
lin_reg.fit(X_poly, Y)

lin_reg.predict(poly_reg.fit_transform([[15]]))