成功解決SyntaxError: import * only allowed at module level
目錄
解決問題
解決思路
語法錯誤:只允許在模塊級導入*
解決方法
def函數內,不要有以下用法,放在函數外邊即可!
def ML5_Re_Plot():
from sklearn.linear_model import LinearRegression
應改爲
from sklearn.linear_model import LinearRegression
def ML5_Re_Plot():