PolynomialFeatures(degree = ).fit_transform is used to create a matrix where each value of your independent variable, x, is organized into row arrays based on the degree
If you have features [a, b, c] the default polynomial features(in sklearn the degree is 2) should be [1, a, b, c, a^2, b^2, c^2, ab, bc, ca].
If you have features [1] and degree = 2, the matrix should give [1, 1, 1,]
If you have features [2] and degree = 2, the matrix should give [1, 2, 4,]
If you have features [3] and degree = 2, the matrix should give [1, 3, 9,]