Successfully resolved SyntaxError: import * only allowed at module level
table of Contents
Solve the problem
Solutions
Syntax error: Only import at module level *
Solution
Within the def function, don't use the following usage, just put it outside the function!
def ML5_Re_Plot():
from sklearn.linear_model import LinearRegression
Should be changed to
from sklearn.linear_model import LinearRegression
def ML5_Re_Plot():