Professional Documents
Culture Documents
Salary Projection
Salary Projection
Salary Projection
/usr/bin/env python
# coding: utf-8
# In[30]:
import pandas as pd
# In[31]:
df = pd.read_csv("Salary_Data.csv")
# In[32]:
df.head()
# In[33]:
X = df.iloc[:, :-1]
y = df.iloc[:, 1]
# In[36]:
# In[38]:
# In[39]:
y_pred = regressor.predict(X_test)
# In[57]:
# In[59]:
# In[61]:
salary_pred = regressor.predict([[12]])
print("The salary for that amount of years experience is: ", salary_pred)