from sklearn.preprocessing import PolynomialFeatures poly=PolynomialFeatures(degree=3,interaction_only=True) polynomials=pd.DataFrame(poly.fit_transform(dff),columns=[\'0\',\'1\