text_plain_output_1.png
import matplotlib.pyplot as plt #for visualizing

import os

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import numpy as np
import pandas as pd
pd.options.display.float_format = '{:20,.2f}'.format
import os

Salary = pd.read_csv('../input/salary/Salary.csv')

model = pd.read_csv('../input/salary/Salary.csv')

fig,ax = plt.subplots()
ax.scatter(x='YearsExperience',y='Salary',data=Salary)
ax.add_line(plt.Line2D(model['YearsExperience'],model.predicted0,color='red'))
ax.add_line(plt.Line2D(model['YearsExperience'],model.predicted1,color='Black'))
ax.add_line(plt.Line2D(model['YearsExperience'],model.predicted2,color='Green'))

x = Salary.loc[:, ['YearsExperience']]
y = Salary.loc[:, ['Salary']]

fig, ax = plt.subplots()
ax.scatter(x='YearsExperience', y='Salary', data=Salary)
ax.add_line(plt.Line2D(model['YearsExperience'], model.predicted3, color='red'))
ax.add_line(plt.Line2D(model['YearsExperience'], model.predicted0, color='Green'))
ax.add_line(plt.Line2D(model['YearsExperience'], model.predicted2, color='Black'))