Learn practical skills, build real-world projects, and advance your career
#Importing Libraries
# Install the jovian Python library
!pip install jovian --upgrade -q
# Import the library in your Jupyter notebook
import jovian
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
#Importing Dataset
dataset = pd.read_csv('./Salary_Data.csv')
dataset.head()
dataset.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 30 entries, 0 to 29 Data columns (total 2 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 YearsExperience 30 non-null float64 1 Salary 30 non-null float64 dtypes: float64(2) memory usage: 608.0 bytes
dataset.describe()
#Plotting of X and Y
plt.style.use("seaborn-darkgrid")
plt.scatter(dataset.YearsExperience,dataset.Salary)
plt.xlabel("Years of experience")
plt.ylabel("Salary")
Text(0, 0.5, 'Salary')
Notebook Image