def fit_line(df, x, y, figsize=(9, 6)):
    cs = np.polyfit(df[x], df[y], 1)
    f = np.poly1d(cs)
    ax1 = df[[x, y]].plot.scatter(x=x, y=y, figsize=figsize)
    df['fit'] = f(df[x])
    df.plot(x=x, y='fit', color='Red', legend=False, ax=ax1)
def fit_line(df, x, y, figsize=(9, 6)):
    cs = np.polyfit(df[x], df[y], 1)
    f = np.poly1d(cs)
    ax1 = df[[x, y]].plot.scatter(x=x, y=y, figsize=figsize)
    df['fit'] = f(df[x])
    df.plot(x=x, y='fit', color='Red', legend=False, ax=ax1)