text_plain_output_2.png text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

data = pd.read_csv('/kaggle/input/salary-dataset-simple-linear-regression/Salary_dataset.csv')

data.isnull().sum()

data.isnull().sum().to_frame().rename(columns={0: 'Total No. of Missing Values'})

x = data.YearsExperience
y = data.Salary

plt.title('Salary Data')
plt.scatter(x, y, marker='x', c='r')
plt.xlabel('Years of Experience')
plt.ylabel('Salary (per year)')
plt.show()