我正在分析Iris dataset並在花瓣寬度和花瓣長度之間做了散點圖。爲了使情節我用這個代碼: # First, we'll import pandas, a data processing and CSV file I/O library
import pandas as pd
# We'll also import seaborn, a Python graphing library
我嘗試應用下面的函數來計算每個數據幀列的斜率和截距斜率: from scipy.stats import linregress
def fit_line(x, y):
"""Return slope, intercept of best fit line."""
# Remove entries where either x or y is NaN.
clean_d