text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

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

df = pd.read_csv('/kaggle/input/years-of-experience-and-salary-dataset/Salary_Data.csv')

x = df[['YearsExperience']]
x

y = df.iloc[:, 1].values
y

plt.scatter(x, y)
plt.show()